diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 5dc70b3d..9550bff0 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -46,8 +46,8 @@ jobs: python3 --version OUT="$RUNNER_TEMP/conformance" ./tools/conformance.sh # REUSE, by the specification's own tool -- CI-ONLY like the conformance number: the - # gate's REUSE step reads headers and excludes the slice archives; this reads the whole - # tree under REUSE.toml and is the compliance claim CONTRIBUTING makes. The runner's + # gate's REUSE step reads headers; this reads the whole tree by the specification's rules + # and is the compliance claim CONTRIBUTING makes. The runner's # pipx installs it; the version is pinned so the verdict is a function of the tree. - name: REUSE - the specification's lint over the whole tree if: always() diff --git a/CHANGELOG.md b/CHANGELOG.md index 30679a2a..51f275fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,19 @@ All notable changes to this project are documented here. The format follows ## [Unreleased] +### Changed: the slice records leave the public tree; SLICES.md says what each slice committed + +- The `slices/` archive (243 files: the plans, review logs and gate runs of slices 001 to 007) + is removed from the public tree; the team's records live in its internal repository, where + these were copied byte for byte first. `SLICES.md` takes its place: every slice that has + landed, one line on what it committed, and its pull request. The publication step's + allowlist is now empty, so the gate refuses any tracked path under `slices/`; `REUSE.toml`, + which only annotated that archive, goes with it (the REUSE lint: 461 of 461 files carry + copyright and licence information without it). Comments in `lib/` and the tests that cited a + slice file now say which slice's record holds the measurement. Nothing is rewritten in the + history: the files remain in earlier commits. Two tools whose only input was that archive + (`tools/archive_sweep.sh`, `tools/probe_archive_tally.sh`) are removed. + ## [0.10.0] - 2026-09-23 The quiet minor again: **no public entry added, removed, renamed, hidden or changed in arity** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 65ffb47a..baa1c4e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,8 +103,8 @@ is the project's aim; the pull requests show who reviewed each one. break the property in a throwaway copy and show the test catches it. - **Counts quoted from command output, never typed.** Test counts, exit codes, file counts. - **SPDX headers** on every `.ex`, `.exs`, `.sh` and `.yml`. The gate checks it, and CI runs - the REUSE Specification's own lint over the whole tree (`pipx run reuse==6.2.0 lint` locally, the version CI pins; - `REUSE.toml` covers the slice archives). + the REUSE Specification's own lint over the whole tree (`pipx run reuse==6.2.0 lint` locally, + the version CI pins). - **Scope discipline.** One commit does one thing and says so. If a fix uncovers a second defect, file it rather than folding it in. diff --git a/REUSE.toml b/REUSE.toml deleted file mode 100644 index 9f119efc..00000000 --- a/REUSE.toml +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# REUSE Specification 3.3 annotations for the slice archives under slices/: tool output and -# review reports, the project's own records, kept as written. "override": this file's values -# stand for every file under slices/ -- the 45 that carry a header carry these same values, -# and two archived files (a gate log and a headered FINDINGS page) quote the bare text -# "SPDX-License-Identifier:" with nothing after it, which the tool reads from the file as an -# empty expression under any precedence but this one (measured: "closest" failed on both). Nothing -# else in the tree needs this file: every source file carries its header, and the gate holds -# that. - -version = 1 - -[[annotations]] -path = ["slices/**"] -precedence = "override" -SPDX-FileCopyrightText = "2026 Sudo Apt Holdings LLC" -SPDX-License-Identifier = "Apache-2.0" diff --git a/SLICES.md b/SLICES.md new file mode 100644 index 00000000..56a28e7e --- /dev/null +++ b/SLICES.md @@ -0,0 +1,86 @@ + + +# Slices + +The work on this package is done in slices: each is a planned, reviewed unit of change that +lands through one pull request. The plans, review records and working notes behind them are +the team's and are kept outside this repository. What is public is what each slice committed, +below, and the detail of each change: its pull request, its commit messages, and the +CHANGELOG entry of the release it shipped in. + +## 0.1.0 to 0.3.1: the protocol core and the HTTP transport + +| slice | what it committed | pull request | +|---|---|---| +| 001 | Two protocol revisions supported and told apart (revision negotiation, `server/discover`); landed before pull requests were required | commit [36136a1](https://github.com/ScriptKittyOS/beam_mcp/commit/36136a1) | +| (before the numbering rule) | Errors carried across the wire as JSON, not Elixir terms; the DCO check and the governance files | [#1](https://github.com/ScriptKittyOS/beam_mcp/pull/1), [#2](https://github.com/ScriptKittyOS/beam_mcp/pull/2) | +| 001b | A request served by the protocol revision its `_meta` declares; released as 0.2.0 | [#7](https://github.com/ScriptKittyOS/beam_mcp/pull/7), [#8](https://github.com/ScriptKittyOS/beam_mcp/pull/8) | +| 002 | The stateless Streamable HTTP transport; released as 0.3.0 | [#9](https://github.com/ScriptKittyOS/beam_mcp/pull/9) | +| 003 | Release 0.3.1: four fixes to the HTTP transport | [#13](https://github.com/ScriptKittyOS/beam_mcp/pull/13) | +| 004 | The quality gate: one verdict per step, the licence population derived, a review bound to a tree | [#12](https://github.com/ScriptKittyOS/beam_mcp/pull/12) | +| 006 | The test harness reads a closed connection correctly | [#16](https://github.com/ScriptKittyOS/beam_mcp/pull/16) | +| 007 | `authorize_body/2`, a hook after the body is read, so body-signature authentication is possible | [#20](https://github.com/ScriptKittyOS/beam_mcp/pull/20) | + +## 0.4.0 and 0.5.0: the catalog and the connectome + +| slice | what it committed | pull request | +|---|---|---| +| 008 | One catalog contract carrying tools, resources and prompts | [#21](https://github.com/ScriptKittyOS/beam_mcp/pull/21) | +| 009 | The connectome vocabulary, and a gate step that keeps working records out of the public tree | [#22](https://github.com/ScriptKittyOS/beam_mcp/pull/22) | +| 010 | The connectome data model: nodes, edges, graphs, with a sign slot the package never fills | [#23](https://github.com/ScriptKittyOS/beam_mcp/pull/23) | +| 011 | The declared connectome, built from the catalog and the compiled code | [#24](https://github.com/ScriptKittyOS/beam_mcp/pull/24) | +| 012 | Canonical bytes, a hash, and DOT, GraphML and JSON exports | [#25](https://github.com/ScriptKittyOS/beam_mcp/pull/25) | +| 013 | The observed connectome: a dispatch span, a collector, a guarded tracer | [#26](https://github.com/ScriptKittyOS/beam_mcp/pull/26) | +| 014 | The diff engine: declared against observed, four classes and a coverage bound | [#27](https://github.com/ScriptKittyOS/beam_mcp/pull/27) | +| 015 | Release 0.4.0 | [#28](https://github.com/ScriptKittyOS/beam_mcp/pull/28) | +| 016 | Reachability queries: reachable, reachable without a gate, dominators | [#29](https://github.com/ScriptKittyOS/beam_mcp/pull/29) | +| 016a | The official MCP conformance suite, two rows, run in CI | [#30](https://github.com/ScriptKittyOS/beam_mcp/pull/30), [#31](https://github.com/ScriptKittyOS/beam_mcp/pull/31) | +| 016b | The resources primitive and one pagination codec | [#35](https://github.com/ScriptKittyOS/beam_mcp/pull/35) | +| 016c | The prompts primitive, on the tools' validation path | [#36](https://github.com/ScriptKittyOS/beam_mcp/pull/36) | +| 016d | The sign vocabulary | [#33](https://github.com/ScriptKittyOS/beam_mcp/pull/33) | +| 017 | The connectome on the wire: three read-only resources and a tool the host writes | [#37](https://github.com/ScriptKittyOS/beam_mcp/pull/37) | +| 018 | Release 0.5.0 | [#38](https://github.com/ScriptKittyOS/beam_mcp/pull/38), [#39](https://github.com/ScriptKittyOS/beam_mcp/pull/39) | +| 028b | The will-not-implement page, each entry held by a test | [#32](https://github.com/ScriptKittyOS/beam_mcp/pull/32) | +| 028c | The documentation ships in the Hex tarball | [#34](https://github.com/ScriptKittyOS/beam_mcp/pull/34) | + +## 0.6.0 to 0.8.0: hardening, supply chain and the signer seam + +| slice | what it committed | pull request | +|---|---|---| +| 021 | The canonical envelope names its algorithm; SHA-384 and SHA-512 by option | [#42](https://github.com/ScriptKittyOS/beam_mcp/pull/42) | +| 022 | The OTP floor (27) enforced at compile time | [#44](https://github.com/ScriptKittyOS/beam_mcp/pull/44) | +| 023 | CI on three OTP/Elixir pairs | [#45](https://github.com/ScriptKittyOS/beam_mcp/pull/45) | +| 024 | The dependency audit as a gate step | [#47](https://github.com/ScriptKittyOS/beam_mcp/pull/47) | +| 025 | Build provenance over the Hex tarball | [#48](https://github.com/ScriptKittyOS/beam_mcp/pull/48) | +| 026 | The security policy, shipped with the package | [#49](https://github.com/ScriptKittyOS/beam_mcp/pull/49), [#50](https://github.com/ScriptKittyOS/beam_mcp/pull/50) | +| 027a | Dialyzer in the gate and the review instruments | [#51](https://github.com/ScriptKittyOS/beam_mcp/pull/51) | +| 027b | The tracer in an OTP trace session of its own; opt-in git hooks | [#52](https://github.com/ScriptKittyOS/beam_mcp/pull/52) | +| 028 | API stability: the public surface pinned, the policy, the upgrade guide | [#53](https://github.com/ScriptKittyOS/beam_mcp/pull/53) | +| 029 | The threat model; JSON nesting bounded before decoding | [#40](https://github.com/ScriptKittyOS/beam_mcp/pull/40) | +| 029a | The HTTP body read deadline | [#41](https://github.com/ScriptKittyOS/beam_mcp/pull/41) | +| 029b | The HTTP/2 connection deadline | [#43](https://github.com/ScriptKittyOS/beam_mcp/pull/43) | +| 030 | Governance and succession; every workflow pinned by SHA | [#54](https://github.com/ScriptKittyOS/beam_mcp/pull/54) | +| 031 | The export-control statement; REUSE compliance | [#55](https://github.com/ScriptKittyOS/beam_mcp/pull/55) | +| 032 | Release 0.6.0 | [#56](https://github.com/ScriptKittyOS/beam_mcp/pull/56) | +| 033 | The signer seam: `BeamMCP.Signer`, `Signer.None`, `Canonical.signature/3`; released as 0.7.0 | [#57](https://github.com/ScriptKittyOS/beam_mcp/pull/57), [#58](https://github.com/ScriptKittyOS/beam_mcp/pull/58) | +| 035 | Release 0.8.0, the quiet minor | [#59](https://github.com/ScriptKittyOS/beam_mcp/pull/59) | + +## 0.9.0 and 0.10.0 + +| slice | what it committed | pull request | +|---|---|---| +| 036 | The `:server` seam on both transports | [#64](https://github.com/ScriptKittyOS/beam_mcp/pull/64) | +| 037 | `scheme:` and `key_id:` beside the signature | [#64](https://github.com/ScriptKittyOS/beam_mcp/pull/64) | +| 038 | Release 0.9.0 | [#64](https://github.com/ScriptKittyOS/beam_mcp/pull/64) | +| 039 | The documentation free of em dashes | [#73](https://github.com/ScriptKittyOS/beam_mcp/pull/73) | +| 040 | The suite in FIPS mode in CI, on the validated OpenSSL FIPS provider | [#73](https://github.com/ScriptKittyOS/beam_mcp/pull/73) | +| 041 | A CycloneDX SBOM attested to every release | [#73](https://github.com/ScriptKittyOS/beam_mcp/pull/73) | +| 042 | README's schedule follows the road to 1.0.0 | [#73](https://github.com/ScriptKittyOS/beam_mcp/pull/73) | +| 043 | Release 0.10.0 | [#73](https://github.com/ScriptKittyOS/beam_mcp/pull/73) | + +Work that was not a numbered slice (the OpenSSF Best Practices pages, continuity, dependency +updates) is in the pull requests and the CHANGELOG. A slice that lands later is added here in +the pull request that lands it. diff --git a/lib/beam_mcp/transport/http.ex b/lib/beam_mcp/transport/http.ex index 3fe99478..1e6185f8 100644 --- a/lib/beam_mcp/transport/http.ex +++ b/lib/beam_mcp/transport/http.ex @@ -330,7 +330,7 @@ if Code.ensure_loaded?(Plug) do # COMPILE time, and a correct catalog that reads config or ETS would fail there -- the # same class as the `ensure_loaded?` defect this check already carries a comment about. # The map's SHAPE is refused by `BeamMCP.Server.new/1`, which is runtime. Recorded in - # slices/008-catalog-generalization/FINDINGS.md as the one place "refuse at init" is + # slice 008's findings (internal) as the one place "refuse at init" is # answered with "as much as is safe here". unless is_atom(catalog) and catalog != nil and match?({:module, _}, Code.ensure_compiled(catalog)) and @@ -432,7 +432,7 @@ if Code.ensure_loaded?(Plug) do # `connection: close` is how a response declines both. Bandit reads it in # `handle_keepalive/3`, sets `keepalive: false`, and `ensure_completed/1` then returns # without reading anything. Measured both ways in - # `slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt`. + # slice 003's record `probe-d-bandit-drain-limits.txt` (internal). # # WHY THIS SHAPE AND NOT `close_after/1` AT EACH SITE. The population is the steps of this # function, derived rather than listed. Two commands, and what each is for: @@ -1235,7 +1235,7 @@ if Code.ensure_loaded?(Plug) do # not. So a host catalog that RAISED kept the request's id, and the same host catalog # returning MALFORMED DATA -- a map where a `%ToolSpec{}` was promised -- raised `KeyError` # one line later, escaped to `call/2`'s rescue and answered `id: null`. Measured in - # `slices/002-streamable-http/logs/probe-fault-ids.txt`: + # slice 002's record `probe-fault-ids.txt` (internal): # # host catalog RAISES (header validation) 500 -32603 id=4242 # host catalog returns a malformed spec 500 -32603 id=nil @@ -1247,7 +1247,7 @@ if Code.ensure_loaded?(Plug) do # DEFECT-DRIVEN, said here because the first version of this comment claimed more than had # been measured. Its inputs are the annotation names, paths and types the host wrote, so it # belongs on the host's side of the boundary on principle -- but the mutant that leaves it - # outside SURVIVES the suite: `Mc2` in `slices/003-release-0-3-1/logs/mutation-round3.txt`, + # outside SURVIVES the suite: `Mc2` in slice 003's record `mutation-round3.txt` (internal), # 158 tests, 0 failures, twice, re-scored on the tree that ships rather than carried forward # from the round it was first run in. It survives because reaching a raise needs a # `properties` map whose KEY diff --git a/slices/001-revision-negotiation/PLAN.md b/slices/001-revision-negotiation/PLAN.md deleted file mode 100644 index 9be4d23a..00000000 --- a/slices/001-revision-negotiation/PLAN.md +++ /dev/null @@ -1,216 +0,0 @@ - - -# Slice 001 — Revision negotiation and `server/discover` - -**Written before any code.** Every claim about the specification below was fetched from -`modelcontextprotocol.io` on 2026-09-06, not recalled: the current revision post-dates this -agent's training data, so nothing here is asserted from memory. - -## The gap, demonstrated - -Run against the server as it stands at `1ac057e`: - - server/discover - -> {"error":{"code":-32601,"message":"Method not found: server/discover"}} - - tools/list carrying modern _meta, no initialize - -> {"result":{"tools":[...]}} <-- ANSWERED, as if legacy - - initialize - -> {"result":{"protocolVersion":"2024-11-05",...}} - -**The second line is the defect, not the first.** A missing method is an honest error a client -can act on. Answering a `2026-07-28` request with a `2024-11-05`-shaped result is the -specification's own worst case — its compatibility matrix says a modern client against a legacy -server "may reject the request, stay silent, **or even process an era-ambiguous method under -legacy semantics**". That result omits `resultType`, omits `_meta` `serverInfo`, and omits the -`ttlMs`/`cacheScope` that `2026-07-28` **requires** on `tools/list`. It looks like success. - -## What the specification actually says - -**Five revisions, not four.** Derived from the changelog chain, each page naming its -predecessor: - - 2024-11-05 -> 2025-03-26 -> 2025-06-18 -> 2025-11-25 -> 2026-07-28 (current) - -**The split is by era, not by revision.** The spec defines the terms itself: - -> **Modern**: protocol versions that convey version, identity, and capabilities as -> per-request metadata (revision `2026-07-28` and later). -> **Legacy**: protocol versions that establish a session with an `initialize` handshake -> (`2025-11-25` and earlier). -> **Dual-era**: an implementation that supports both. - -So negotiation is **two mechanisms**, exactly as the owner said: - -| | Legacy client | Modern client | -|---|---|---| -| opens with | `initialize`, then `notifications/initialized` | any request, or `server/discover` | -| carries version in | the `initialize` params | `_meta` `io.modelcontextprotocol/protocolVersion`, per request | -| session | yes, protocol-level | none; every request stands alone | - -**How a dual-era server tells them apart from the first message** — quoted: - -> A dual-era **server** selects its behavior from how the client opens: -> * A request carrying modern per-request `_meta` is served statelessly according to this revision. -> * An `initialize` request selects legacy semantics. - -That is the whole discriminator, and it is cheap: presence of `_meta` protocol version, or the -method being `initialize`. - -**`server/discover` is mandatory.** *"Servers **MUST** implement `server/discover`."* Clients -**MAY** call it first; on stdio it is also the backward-compatibility probe — a client sends it -and falls back to `initialize` on any error that is not a recognised modern error. - -**Version rejection has a defined shape and code**, `-32022`: - - {"error":{"code":-32022,"message":"Unsupported protocol version", - "data":{"supported":["2026-07-28","2025-11-25"],"requested":"1900-01-01"}}} - -Note `-32022`, not `-32004`: the codes were renumbered in this revision under a new allocation -policy, and the old numbers are the draft's. - -**Also removed in 2026-07-28, and we implement two of them:** `initialize`, -`notifications/initialized`, **`ping`**, `logging/setLevel`. All results gain a required -`resultType`. `tools/list` results gain required `ttlMs` and `cacheScope`. - -## JSON-RPC batching — answered, and it decides nothing here - - added 2025-03-26 "Added support for JSON-RPC batching" - removed 2025-06-18 "Remove support for JSON-RPC batching" - -**Batching is required in exactly one revision of the five.** Neither candidate compat revision -below is that one, so **the server neither accepts nor emits batches**, and that is a -consequence of the revision choice rather than a separate decision. Recorded because the -question was asked and the answer is a reason to avoid `2025-03-26` as a compat choice. - -## Proposed supported set — derived, with one gap named - -**`2026-07-28` (modern) + `2025-11-25` (legacy).** Two revisions, not five. - -Derivation: - -1. The current revision is mandatory for the package to be worth publishing at all; that is - the whole reason this slice precedes a release. -2. The spec's compatibility model is **era-based**. A dual-era server needs *one* legacy - revision to serve handshake clients — supporting several buys nothing, because a legacy - client that cannot use the one offered has no fall-forward either way. -3. Of the four legacy revisions, `2025-11-25` is the newest, so it covers the most clients. -4. It also avoids `2025-03-26`, the only revision that requires batching. - -**The gap, stated rather than glossed:** the delta between what this server implements today -(`2024-11-05`) and what `2025-11-25` requires is **not yet measured**. That measurement is the -first task of this slice, before any negotiation code. If it proves large, the alternative is -`2026-07-28` + `2024-11-05` — keeping the legacy side exactly where it is and spending the -budget on the modern side. **The PLAN does not pre-decide that; it names the measurement that -settles it.** - -## Order of work - -1. **Measure the `2024-11-05` -> `2025-11-25` delta** for a tools-only server. Report before - writing negotiation code. This decides the legacy revision. -2. **`server/discover`**, red first: the demonstration above is the red. -3. **The era discriminator** and per-request `_meta` handling, red first per era. -4. **`UnsupportedProtocolVersionError`** with `-32022` and the `supported`/`requested` shape. -5. **`resultType`**, and `ttlMs`/`cacheScope` on `tools/list`, for modern responses only. -6. **Decide `ping`.** Removed in `2026-07-28`, present here. It stays for legacy and must not - be advertised as modern. - -## Out of scope - -Streamable HTTP, `subscriptions/listen`, MRTR, tasks, authorization, elicitation, sampling, -roots. This slice is stdio and version handling. MRTR is named in the project's own later -scope and is not smuggled in here. - -## Deliverable alongside - -`CHANGELOG.md`, seeded from the seven commits to date and carrying this slice's entry. - ---- - -# Step 1 — the `2024-11-05` -> `2025-11-25` delta, measured - -Owner ruling 2026-09-06: the pair is **`2026-07-28` + `2025-11-25`**, gated on this -measurement, with `2026-07-28` + `2024-11-05` as the fallback if the delta measures large. -**It does not. The delta is small, so the ruling stands and the fallback is not taken.** - -Derived by walking all three intervening changelogs and filtering to what a **tools-only stdio -server** must do. Auth, Streamable HTTP, elicitation, sampling, roots and tasks are excluded -because this server implements none of them and none is mandatory for a tools-only server. - -## Already compliant — measured against the running server, not assumed - -| item | revision | evidence | -|---|---|---| -| Tool annotations | 2025-03-26 | emits `readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint` | -| Structured tool output | 2025-06-18 | emits `structuredContent` alongside `content` | -| Input-validation errors are **Tool Execution Errors, not Protocol Errors** (SEP-1303) | 2025-11-25 | an invalid call returns a `result` with `isError: true`, **not** a JSON-RPC error | -| No JSON-RPC batching | added 2025-03-26, removed 2025-06-18 | never implemented; correct for a 2025-11-25 target | -| stderr may carry all logging | 2025-11-25 | clarification, permissive | - -**Three of the four substantive 2025-era items for this server class are already done.** That -is the finding: the legacy side is much closer to `2025-11-25` than its advertised -`2024-11-05` suggests. - -## Real work on the legacy side — one item - -**`initialize` ignores the version the client asks for.** Measured: - - request {"method":"initialize","params":{"protocolVersion":"2025-11-25"}} - response {"result":{"protocolVersion":"2024-11-05", ...}} - -The server answers with a compiled-in constant whatever it is asked. Lifecycle operation went -**SHOULD to MUST** in `2025-06-18`, so this is non-conformant for any legacy revision after -`2024-11-05`. **It is needed for whichever compat revision is chosen**, so it is not a cost of -picking `2025-11-25`. - -## Small, and optional - -- **JSON Schema 2020-12 as the default dialect** (2025-11-25). This validator is a deliberate - subset; the work is declaring the dialect and confirming the subset does not contradict it. -- `title`, `icons`, and `description` on `Implementation` are all **optional** and are not - adopted by this slice. - -## Found while measuring, and not a revision item - -**The error payload leaks Elixir syntax onto the wire:** - - "structuredContent":{"error":"%{reason: \"invalid arguments: missing required property: a\", tool: :t}"} - -That is `inspect/1` output on a map, reaching a client that has no reason to parse Elixir. It -is a defect at every revision, independent of this slice, and it is recorded rather than fixed -here. - -## `ping` — the owner's added item - -Measured: `{"method":"ping"}` returns `{"result":{}}` today. - -`ping` is **removed in `2026-07-28`** (major change 5). So the two eras must disagree, and the -hazard is precisely that a shared handler answers both: - -- **Legacy era** — `ping` is answered, as now. Correct for `2025-11-25` and earlier. -- **Modern era** — `ping` **does not exist**. A modern request for it gets method-not-found, - the same as any unknown method. **The legacy handler must not inherit it**, and a test - asserts a modern-era `ping` is refused while a legacy-era `ping` succeeds. - -## Amendments to this PLAN, per the owner - -1. **Batching is asserted, not merely absent.** A test asserts the server neither accepts nor - emits JSON-RPC batches, at both eras, so its absence is a property rather than an accident. -2. **`-32022`** is the `UnsupportedProtocolVersionError` code, per the revision's error-code - allocation policy. **Most secondary sources still show `-32004`**, the draft number, which - was renumbered in this revision along with `HeaderMismatch` (`-32001` to `-32020`) and - `MissingRequiredClientCapability` (`-32003` to `-32021`). Anyone checking this against a - blog post or an SDK written before the renumbering will find the old value. -3. **`CHANGELOG.md`** records the red's second line, in those words, as the reason `0.1.0` was - not published at `c5da02f`: *a `2026-07-28` request answered with a `2024-11-05`-shaped - result that looks like success.* - -## Verdict - -**Proceed with `2026-07-28` + `2025-11-25`.** The fallback is not needed. The legacy-side work -is one item — honouring the requested version in `initialize` — which any compat choice -requires anyway. diff --git a/slices/001b-ping-guard/FINDINGS.md b/slices/001b-ping-guard/FINDINGS.md deleted file mode 100644 index dc72e997..00000000 --- a/slices/001b-ping-guard/FINDINGS.md +++ /dev/null @@ -1,588 +0,0 @@ - - -# Slice 001b — FINDINGS - -Every count below is quoted from the output of the named command. Every log file under -`logs/` was written by the command that produced it (`… | tee logs/.txt`), so it is an -archive in the sense `CONVENTIONS.md` requires — the bytes are the command's bytes, not a -transcription. - -Worktree: `/home/aylac/Projects/beam_mcp-wt/001b-ping-guard`, branch `slice/001b-ping-guard`, -off `main` at `5d8d1ae`, with its own `_build` and `deps`. The canonical clone was not written -to. - -## Finding 1 — `ping` refused under `2025-11-25`. SCR-257. Live in published `0.1.0`. - -`lib/beam_mcp/server.ex:120-135` at `5d8d1ae`. The `_meta` clause's `cond` branched on -`message["method"] == "ping"` with no comparison against `@modern_version`, while the comment -above it named `2026-07-28`. - -**Observed** — `mix run /probe_ping.exs`, `mix.exs` version `0.1.1`: - - ping + _meta 2026-07-28 - -> {"error":{"code":-32601,"message":"Method not found: ping"},"id":1,"jsonrpc":"2.0"} - ping + _meta 2025-11-25 - -> {"error":{"code":-32601,"message":"Method not found: ping"},"id":1,"jsonrpc":"2.0"} - ping + _meta, no version key - -> {"id":1,"jsonrpc":"2.0","result":{}} - ping bare - -> {"id":1,"jsonrpc":"2.0","result":{}} - -**Expected**: line 2 returns `{"result":{}}`. `ping` exists in `2025-11-25`; this server -advertises `2025-11-25` in `server/discover` and lists it in the `-32022` `supported` payload. - -**Boundary, measured rather than assumed**: line 3. A `_meta` carrying no -`io.modelcontextprotocol/protocolVersion` does not match the clause head and falls through to -the bare handler. The defect is specific to a `_meta` that names a revision. - -## Finding 2 — the same clause modernised every result, on the same version-blind basis - -Not in SCR-257; found while measuring finding 1. - -**Observed**, same command and run: - - tools/list + _meta 2025-11-25 - -> {"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo": - {"name":"beam_mcp","version":"0.1.1"}},"resultType":"complete","tools":[...]}} - -**Expected**: no `resultType`, no `_meta`. Both are `2026-07-28` additions. - -**Corrected in round 2, r1 finding 1c.** Round 1 argued this from the changelog's item 8 — -clients "**MUST** treat results from earlier-protocol servers that omit the field as -`complete`" — and said that MUST "is only coherent if an earlier-revision result omits it". -That is an inference, and it was set next to two genuinely quoted MUSTs where it read as a -third. It is not one: item 8's MUST is addressed to **clients** and governs how they handle -*omission*, not whether a server may *emit*. r1 also checked `2025-11-25`'s own base-protocol -page, which says a result "**MAY** follow any JSON object structure" — so keeping the two -fields would have violated no normative requirement in either revision. - -The corrected basis: emitting `resultType` and a modern `serverInfo` on a result answering a -request that declared `2025-11-25` announces a revision the client did not ask for. The fix -wins on **honesty**, not on conformance. The distinction matters because a conformance claim -is checkable against the spec and this one would have failed. - -Same root cause as finding 1 — one `cond` that never reads `version` — so fixed in the same -change rather than filed onward. Fixing only `ping` would have left the clause version-blind. - -## The red, before any edit to `lib/` - - $ mix test test/beam_mcp/negotiation_test.exs - 12 tests, 2 failures - exit=2 - -Full output: `logs/red.txt`, written by the command. - -**Corrected in round 2, r1 finding 6.1.** The first version of this sentence read "the ten -pre-existing tests passed, so the red is the two additions". Both numbers were typed fresh and -both are wrong, which is the exact thing `CONVENTIONS.md` forbids. Derived rather than typed: - - $ git show base/main:test/beam_mcp/negotiation_test.exs | grep -c '^\s*test ' - 9 - $ grep -c '^\s*test ' test/beam_mcp/negotiation_test.exs # at the round-1 index - 12 - -**Nine** pre-existing tests, **three** additions. Two of the three are red at `base/main`; the -third (`a 2026-07-28 result carries resultType and serverInfo _meta`) passes there and is a -regression guard, not a red. The old sentence's arithmetic was self-consistent and landed on -the right total, which is why it survived being written. - -Round 2 added three more tests — two of them mutation-killed, the third an unscored guard, -as corrected below — for a file total of 15. - -## Green - - $ mix test test/beam_mcp/negotiation_test.exs - 12 tests, 0 failures - exit=0 - - $ mix test - 36 tests, 0 failures - -**Those two counts are the ROUND-1 measurement and the archives no longer hold them.** Round 2 -added three tests and re-took both logs, so `logs/green-negotiation.txt` now reads -`15 tests, 0 failures` and `logs/full-suite.txt` `39 tests, 0 failures`. The round-1 numbers are -kept here because this section is the round-1 record; the citations to the log files are removed -from them, because a citation pointing at bytes that say something else is worse than no -citation. r2 finding 2 — and it is the same defect as r1's 6.1, in the same file, one round -later: re-taking the evidence and leaving the quotation behind. - - $ mix run /probe_ping.exs # logs/probe-after.txt - ping + _meta 2026-07-28 -> {"error":{"code":-32601,...}} unchanged - ping + _meta 2025-11-25 -> {"id":1,"jsonrpc":"2.0","result":{}} - ping + _meta, no version key -> {"id":1,"jsonrpc":"2.0","result":{}} unchanged - ping bare -> {"id":1,"jsonrpc":"2.0","result":{}} unchanged - tools/list + _meta 2025-11-25 -> {"result":{"tools":[...]}} no resultType, no _meta - tools/list + _meta 2026-07-28 -> {"result":{"_meta":{...},"resultType":"complete",...}} unchanged - -The pre-existing test "a modern ping is refused" was **not** edited and still passes, so -acceptance criterion 2 is met by an unmodified assertion. It is at `negotiation_test.exs:145` -at `base/main` and moves down as lines are inserted above it; cited by name rather than by line -because r2 (finding 7) followed the number into the merged tree and landed on a different test. -`git diff base/main HEAD -- test/` shows no `-` line anywhere in that describe block. - -## Gate - - $ ./tools/gate.sh # logs/gate.txt - == beam_mcp gate == - format pass - compile pass - test pass - credo pass - reuse pass (17 commentable files) - licence files pass - Gate OK. - gate exit=0 - -Read per step, not by exit code alone: all six lines read `pass`. - -## Scripted edits, match counts asserted - -**Six** edits in round 1, each applied by a Python replace that asserted its count before and -after and would have raised rather than no-opped. (Round 1 said "four" over a six-row table — -r1 finding 6.1. Corrected, not rewritten: the table below was always the authority.) - -| edit | file | before | after | -|---|---|---|---| -| `legacy_meta/2` helper | `test/beam_mcp/negotiation_test.exs` | 1 | 1 present | -| three new tests | `test/beam_mcp/negotiation_test.exs` | 1 | old 0, new 1 each | -| the `_meta` clause | `lib/beam_mcp/server.ex` | 1 | old 0, new 1 | -| era table | `README.md` | 1 | old 0, new 1 | -| `@version` | `mix.exs` | 1 | old 0, new 1 | -| `0.1.2` section | `CHANGELOG.md` | 1 | 0.1.2 = 1, 0.1.1 = 1 (kept) | - -## Recorded, not fixed — out of scope, filed onward - -1. **`ttlMs` and `cacheScope` are missing from `tools/list` results.** `2026-07-28` requires - both on `tools/list`, `prompts/list`, `resources/list`, `resources/read` and - `resources/templates/list` via `CacheableResult` (changelog, minor change 5). - `modernise/2` at `lib/beam_mcp/server.ex` adds `resultType` and `_meta` `serverInfo` and - neither of these. Pre-existing since slice 001 and unrelated to the version branch. - Observed in `logs/probe-after.txt`: the `2026-07-28` `tools/list` result carries neither. -2. **A `_meta` with no version key is served bare.** Line 3 of finding 1's measurement. That - is the no-era-established path and belongs to SCR-255, not here. - ---- - -# Round 2 — what the two reviewer lanes changed - -Both lanes read tree `a42f1b1e82599b203df0afcaaa8639203fd663d7`, which equalled `git write-tree` -on the staged index. Both returned **changes required**. **Neither raised a finding against -`lib/`'s logic**: r2 states "The `lib/` change is correct, minimal, and I found nothing to fix -in it", and r1 that "the fix itself is correct, minimal, well-argued against the fetched spec". -Every change below is documentation, evidence, or coverage. - -## Blocking — one, from r1 (finding 2.1) - -`lib/beam_mcp/server.ex:16-18`, the `@moduledoc`, said a `_meta` request "is served statelessly -under **the modern revision**" — the exact rule this slice deletes. The inline comment and the -README were updated in round 1; the moduledoc, which is the hexdocs front page for the -package's principal module, was missed. That is the same doc/code mismatch as the defect the -slice exists to close, one file up. Fixed, and the moduledoc now also names the two methods -matched before the era switch. - -## Coverage — r1 finding 4, and it was a real gap - -`send_msg/1` discards the returned state, so **every** test in the file threw the state away and -nothing could catch a branch returning the wrong one. `shutdown` is the only request method that -changes state and it reaches both branches. Three tests added. **Two of the three are -mutation-killed; the third is not, and cannot be** — nothing on the `ping` path writes state, so -falsifying it would mean inventing a write rather than perturbing an existing one. It is a guard -against a write that does not exist, and it is not scored. Round 2 first claimed all three were -"scored by mutation" over a single mutant; both lanes caught it (r1 finding 1, r2 finding 4) and -both independently ran the second mutation. Corrected, and both mutations are archived **raw** at -`logs/mutation-a.txt` and `logs/mutation-b.txt` — `mix test … > file 2>&1`, no pipe and no -filter, each carrying the seed line, the progress dots, the whole failure block including -`code:` and `stacktrace:`, and the `Finished in …` line. - -Round 3 first wrote a single `logs/mutation.txt` produced by a `{ … } | tee` whose `mix test` -was piped through `grep -E`, and labelled it "written by the commands that ran them". It was a -curated extract: it dropped the seed line and **all five** indented lines of the failure block -(the `1) test …` header survived; the five lines under it did not) — -including the assertion message that identifies *which* assertion failed. r2 caught it (round 3, -blocking) and declined to soften a finding it had made blocking one round earlier on a different -file. That file is deleted and replaced by the two raw captures. **Third instance in this slice -of the same rule.** - -The scoring below is a hand-written summary and is labelled as one — it is not captured output -and does not claim to be: - - mutation: the @legacy_version branch returns {state, response} instead of the recursion's tuple - match count before = 1, old remaining after = 0 # asserted applied - $ mix compile --force # applied before scoring, not after - $ mix test test/beam_mcp/negotiation_test.exs - 1) test ... shutdown declaring 2025-11-25 through _meta still sets shutdown? - 15 tests, 1 failure - REAL_EXIT=2 - -The mutant is killed. A test that passes over an unapplied mutant would have been discarded, not -scored — the rule from SCR-259. - -## A second `lib/` change in round 2, which no lane asked for — disclosed late - -`lib/beam_mcp/server.ex`: `{next, modernise(response, state)}` became -`{next, modernise(response, next)}`, on r1's round-1 **note** 2.3. Round 2's opening sentence -said this section held one `lib/` change, the moduledoc, and that "every change below is -documentation, evidence, or coverage". That was false of the tree it shipped, and r2 (finding 3) -caught it by mutation rather than by reading the record: - - MUTANT: modernise reads the pre-recursion state (this change, reverted) - applied: before=1 old_after=0 new_after=1 - 15 tests, 0 failures - REAL_EXIT=0 # the mutant SURVIVES - -**The change is unfalsifiable today and is kept anyway.** `modernise/2` reads only -`server_name`, which no handler mutates, so `state` and `next` are indistinguishable here — the -code comment says exactly that. It is defensive correctness against a latent trap, not a fix. It -is recorded because an undisclosed edit is a defect in the record whether or not it is a defect -in the code, and because a surviving mutant that is *correctly* a survivor still has to be -reported as one. - -## Evidence — r2 finding 1 / r1 finding 6.3 - -`logs/probe-after.txt` was captured after the `lib/` edit and **before** the `mix.exs` bump, so -it reported `beam_mcp version: 0.1.1` and archived a `serverInfo` carrying `0.1.1` — a version -string that exists nowhere in the committed bytes, in the one file recording what the modern -envelope emits. The bytes were genuinely the command's; the tree they measured was not the tree -being shipped. **Re-taken against the final tree**, and `logs/full-suite.txt` and -`logs/green-negotiation.txt` re-taken with it. - -## Prose that claimed more than the code keeps — r1 2.2, r2 2 and 4 - -Round 1's new README paragraph said the declared revision "decides the method table and the -result envelope". Both lanes found reachable counterexamples, because `server/discover` and -`initialize` are matched **before** the `_meta` clause: - - modern _meta + server/discover - -> {"result":{"capabilities":{...},"protocolVersions":[...],"serverInfo":{...}}} # no resultType - -`server/discover` is **mandatory** in `2026-07-28` and its result carries no `resultType`, which -the same revision requires on every result. Round 1 replaced a paragraph that stated the intended -rule rather than the shipped one with a paragraph that had the same property — which is the -defect this slice is about, committed a second time in the fix for it. The README now carries -both exceptions explicitly, and the `server/discover` gap is recorded below. - -## Recorded in round 2, not fixed — all out of scope, all filed or listed - -3. **`server/discover` results carry no `resultType`.** Mandatory method, required field, - pre-existing since slice 001. Same family as the `ttlMs`/`cacheScope` gap and belongs with it. -4. **The session is tracked and never enforced.** `grep -rn 'initialized?' lib/` returns four - hits: one type, one initialiser, two writes, **no read**. A bare `tools/call` dispatches. That - is SCR-255, and it is now stated in the README rather than left as tribal knowledge — r2's - point that a requirement nobody is told about is not a control. -5. **`-32022` echoes arbitrary caller-supplied JSON** back in `data.requested` - (`server.ex`, `unsupported_version/2`). Maps, lists and booleans are echoed verbatim. - Reflection is to the same caller and amplification is ~1x, so not a defect — recorded because - the new `_other` branch is where it now lives and a future change that logs or forwards that - payload would inherit it. Byte-identical at `base/main`. -6. **The gate's REUSE population is a hand-written glob** (`git ls-files -- '*.ex' '*.exs' '*.sh' - '*.yml'`) under a comment reading "every tracked file that can carry a comment". `.md` is - outside it, and two tracked root `.md` files carry no SPDX header. `.txt` being outside is - **correct** — an SPDX header prepended to a `tee`d archive would stop the bytes being the - command's bytes. - - **The headerless population is derived, not counted by hand** (r2 round 3, finding 2 — which - found the hand-written number four files short and observed it would be six short once the - round-3 reports landed): - - $ git ls-files -- '*.md' | while read -r f; do \ - head -5 "$f" | grep -q 'SPDX-License-Identifier' || echo " $f"; done - - **The `curl -o` rationale does not cover all of them, and that is the point.** It covers the - three `logs/spec-*.md` files exactly — fetched bytes, which a header would corrupt. It does - **not** cover the reviewer-lane reports under `logs/`, which are authored prose: ordinary - `.md` files that this tree's convention would header and that the gate cannot see either way. - So the gap has two kinds of file in it and only one kind has a defence. Filed rather than - fixed. -7. **`tools/gate.sh`'s `licence files` line is not printed at all when an earlier step failed** - (`[ "$fail" -eq 0 ] && note …`), so a reader following "read the step's line, not the exit - code" gets an absent verdict rather than a failing one. Filed rather than fixed. - -## Semver — raised by r2, and left open for the owner - -> **Superseded 2026-09-07: the owner chose `0.2.0`.** This section is left exactly as written, -> as a record of round 2's state, in the same form `PLAN.md`'s Version section carries. The -> asymmetry between them was r2's round-7 finding 3 — this is prose asserting a question is -> open, which round 7's own classification of deliberate non-sweeps did not reach, which is how -> it slipped. - -r2 accepted `0.1.2` but insisted the removal be labelled, which it now is under its own -`### Changed` head. Its argument for `0.2.0` is recorded there rather than resolved here: for a -published package the wire JSON is the API, and two fields disappear from a path that produced -them in `0.1.0`. Publishing is the owner's step, so the number is still theirs to change. - -## Round 2 counts, quoted - - $ mix test test/beam_mcp/negotiation_test.exs 15 tests, 0 failures - $ mix test 39 tests, 0 failures - ---- - -# Rounds 3 and 4 — the same rule, three times, in the file that claims it - -This section exists because r2 (round 3, finding 3) pointed out that the evidence log recorded -none of it: `FINDINGS.md` opens by asserting every file under `logs/` is an archive written by -its command, and the one round where that was untrue was missing from the file making the claim. - -## The recurrence, stated plainly - -| # | round | file | what was wrong | caught by | -|---|---|---|---|---| -| 1 | 1 | `probe-after.txt` | genuine bytes, but of a tree that was not being shipped (`0.1.1`) | r2 finding 1, r1 6.3 | -| 2 | 2 | `full-suite.txt`, `green-negotiation.txt` | re-taken through `\| tail -4`; `mix test`'s seed line stripped | r2, **blocking** | -| 3 | 3 | `mutation.txt` | `{ … } \| tee` with `mix test` piped through `grep -E`; seed line, progress dots, `Finished in`, and **all five** indented failure-block lines dropped | r2, **blocking** | - -Each fix introduced the next defect. Round 2's re-take was the fix for #1 and produced #2. -Round 3's `mutation.txt` was added to close the family and was #3. - -**`FINDINGS.md:234-235` is corrected by this section rather than rewritten.** It reads that the -two logs were "re-taken against the final tree", which is true and is the record of the re-take -that turned out to be filtered. They were re-taken **twice**: once in round 2, filtered, and -again in round 3 with `> file 2>&1`. The first re-take is the sharpest finding in the slice. - -**A fourth hand-written count, found inside the table that catalogues hand-written counts.** -r1 (round 4, finding 2) measured the deleted `mutation.txt` against the raw capture now in the -tree: the `1) test …` header survived and **all five** indented lines were dropped, not four of -five. The wrong figure appeared twice, once in the instance-table row for this exact family. -Corrected above. r1's round-3 figure of thirteen lines per block is the same measurement taken -from the other end and was right. - -**The tally that stood here is deleted rather than corrected**, and that is the point of it. -It read "four fresh counts across five rounds" while `logs/round5.r1.md` heads its own finding -"The fifth count" and the slice ran six rounds — a typed number, wrong in both figures, -**inside the paragraph arguing that a typed count is indistinguishable from a derived one.** -r1 found it (round 6). Replacing it with a freshly typed "five across six" would repeat the -defect in the act of fixing it, and no command in this tree derives the number, so the honest -move is to state the fact without the count: every one of these was caught by a lane, and none -by me. The instances themselves are enumerated in the table above, where they can be counted by -a reader rather than asserted by the author. - -**And the fourth did not originate with me — it came from a reviewer report, and I adopted it -without re-deriving.** r2 raised this against itself in round 5 (finding 4): the "four of five" -figure was written in r2's own round-3 report, in the sentence explaining why its blocking -finding was blocking. I folded that number into `FINDINGS.md` and into the instance table on -the strength of its source, and r1 caught it a round later. - -The lesson is therefore not "be careful with numbers", and not even "derive your own counts". It -is that **a count is underived no matter whose page it is on.** A figure in an adversarial -reviewer's report is exactly as unverified as one in mine; taking it on trust because of who -wrote it is how this one survived two rounds and reached the table that catalogues this family. -`CONVENTIONS.md` requires the command rather than the number, and that requirement does not -weaken when the number arrives from someone checking your work. - -## Why counting is not checking, which is the transferable part - -r1 re-ran both commands in round 2 and compared **counts**. The counts were right, so it passed. -r2 compared **bytes** — `diff` against a fresh run, `1d0` — and ruled out a configuration -explanation (`--seed 0`, `test_helper.exs`) before calling it. Same evidence, same two lanes, one -method finds it and the other cannot. For anything labelled an archive, diff the bytes. - -r2 also declined to soften #3 to a note, and said why: an identical defect on a different file -cannot be blocking one round and a note the next, "or the standard is whatever the reviewer feels -like that morning". Recorded because that is the reason the third instance was caught at all. - -## Round 4 — what changed - -1. `logs/mutation.txt` **deleted**; replaced by `logs/mutation-a.txt` and `logs/mutation-b.txt`, - each `mix test … > file 2>&1`, no pipe, no filter. Both mutations re-run from a fresh copy of - the tree, match counts asserted before and after, `mix compile --force` before scoring per - SCR-259. Mutation A kills the legacy `shutdown` test; B kills the modern one; each run reports - `15 tests, 1 failure`, real exit 2. -2. The label "written by the commands that ran them" removed from `FINDINGS.md` and `REVIEW.md`; - the scoring table is now marked a hand-written summary, which it always was. -3. The `.md` SPDX-gap item now derives its population by command instead of carrying a - hand-written three, and distinguishes fetched bytes (a header would corrupt them) from the - authored lane reports (no such defence). -4. `REVIEW.md`'s tree-hash list extended to round 3 — if the list is the binding, it carries - every round it binds. - -**No change to `lib/` or `test/` in rounds 3 or 4.** Both lanes' `lib/` conclusions stand on -bytes they read at `867f28ce`. - ---- - -# Round 7 — the version decision, and one thing it is worth noticing about it - -**Owner decision, 2026-09-07: `0.2.0`, not `0.1.2`.** `mix.exs` and the `CHANGELOG` heading and -rationale change with it. No `lib/`, no `test/`. - -## What the record got right, and what that cost - -The `### Changed` heading was written in round 2 while the version still read `0.1.2`, because -r2 refused to let a wire-visible field removal ship under `### Fixed` with no removal label. It -recorded the argument for `0.2.0` *and left the number to the owner* rather than resolving it. - -The owner then took the argument from that heading. So the sequence was: a reviewer insisted the -change be described accurately under a number it disagreed with; the description was written -honestly anyway; and the number moved to match the description. **The heading is unchanged in -this round** — softening it now that the number agrees would delete the reasoning that produced -the decision, and would leave a reader unable to see why `0.2.0` was chosen. - -That is the argument for describing a change accurately even when you cannot pick its label: -the accurate description is what lets someone with the authority to pick the label do it well. - -## The `0.1.1` gap, now stated rather than left to be reconstructed - -A reader comparing Hex to the `CHANGELOG` sees `0.1.0`, then a `0.1.1` section naming no -release, then `0.2.0`. The `CHANGELOG` now says why in terms: the number was taken on `main`, -the release it was taken for never happened, and the moduledoc fix it covered ships inside -`0.2.0`. The `0.1.1` section is kept under its original heading rather than folded up. - -## Stale `0.1.2` strings that are deliberately not fixed - - $ grep -rn '0\.1\.2' --include='*.md' . | grep -v _build | grep -v deps/ - -returns hits in **eight** files. The description that stood here named six of them, omitting -`PLAN.md` — which has more hits than any other file — and `REVIEW.md` (r1 round-7, finding 3). -Both are legitimate: `PLAN.md`'s include its superseded `## Version` section, left as written, -and `REVIEW.md`'s is the round-7 decision line itself. A sentence whose whole job is to account -for every remaining hit should not account for six of eight, and the fix is to read the command's -output rather than to summarise it from memory. **They stay.** -The lane reports are immutable archives of what each reviewer read at the time — a lane that -measured `beam_mcp version: 0.1.2` in round 2 did measure that, and rewriting it would falsify -an archive to make the tree look consistent. The historical rows in the tables above are the -same. The live artifacts move. **Naming that set correctly took two attempts**, and r1's round-7 -finding 2 is why: the first version named `mix.exs`, the `CHANGELOG` entry and -`probe-after.txt`, and was wrong in both directions. - -Derived from the delta rather than listed: - - $ git diff --stat -- slices/001b-ping-guard/logs/ - full-suite.txt | 4 ++-- - green-negotiation.txt | 4 ++-- - probe-after.txt | 4 ++-- - -`full-suite.txt` and `green-negotiation.txt` also moved — new seed, new timings — and neither -contains a version string, so the stated reason ("`serverInfo` is read from `mix.exs`") does not -explain them. Re-taking every run-log when the tree moves is the right discipline and is the fix -for instance #1; it simply is not what the record said was done, or why. And in the other -direction `README.md` was a live artifact that should have moved and did not — its dependency -snippet still read `~> 0.1`, which r1 made its round-7 blocking finding. - -`archive-sweep.txt` is *not* in the delta: re-running the sweep reproduces byte-identical bytes -because its output carries no version string. So "regenerated" is defensible for it, but listing -it among the things that changed while the two logs that did change went unnamed got the scope -backwards in both directions. - -This is the corrections-are-appended rule applied to a version bump, and it is worth stating -because the tidy-looking action — sweep every `0.1.2` to `0.2.0` — is the wrong one. - ---- - -# Round 8 — the release number, and the README rule it exposed - -## Both lanes blocked, on different live artifacts - -| lane | finding | -|---|---| -| r2 | `CHANGELOG` stated the wire-behaviour change **backwards** | -| r1 | `README` recommended `{:beam_mcp, "~> 0.1"}` — a requirement spanning the break | - -**r2's.** The rationale read "a method that answered now refuses for a client declaring -`2025-11-25`". r2 enumerated every method on this tree and on `0.1.0`'s: exactly one changed -status, `ping`, and it went **refused → answered**. Zero went answered → refused. - -That sentence was **one of the two grounds given for choosing `0.2.0`**, and it travelled from -the decision through a relay into this record without anyone checking it. It is recorded against -where it came from rather than against this seat, and the decision still stands on its other -ground — the field removal, which is the whole breaking-shaped case. The corrected clause is -r2's and is stronger: *a method that refused now answers, and results on that path have lost two -fields; a consumer could have depended on either.* - -Worth stating plainly: a reviewer measured and contradicted a premise that had been agreed at -three levels above it. That is the review working in the direction it is hardest to work. - -**r1's.** `README.md` recommended `~> 0.1`. Verified with Elixir's own `Version` module rather -than recalled: - - ~> 0.1 0.1.0=true 0.2.0=true <- spans the break - ~> 0.2 0.1.0=false 0.2.0=true - -Nothing is broken — a new user copying it installs the right version. The defect is the other -direction: a consumer who copied it at `0.1.0` is carried across the documented break by a -routine `mix deps.update`, with no change to their own requirement and no signal. **The release -would have shipped the version signal and the advice defeating it in the same commit.** - -It survived a deliberate sweep because **the stale string was `0.1`, not the `0.1.2` that -changed**. A grep finds what you already thought of. - -## The rule that came out of it - -`CONVENTIONS.md` now carries it, and `test/beam_mcp/readme_claims_test.exs` discharges it: every -behavioural claim in the README is pinned by a test that **quotes the sentence it pins** and -asserts that sentence is still present. A claim that moves without its test fails; so does a test -guarding a claim nobody makes any more, which would otherwise read as coverage while guarding -nothing. - -Three claims had been stated in the README and held by nothing: `server/discover` and -`initialize` being matched before the era switch and undecorated; the session being tracked and -never enforced, with `tools/call` served bare; and `tools/call`/`shutdown` at both eras. The -second is the SCR-255 security property, stated as a contract and previously guaranteed by -nothing. - -## Scored by mutation — and one mutation whose source check was uninformative - - MUTANT A: README dependency reverted to "~> 0.1" - match before: 1, old remaining: 0 - 1) ... the README no longer contains the sentence this test pins - 8 tests, 1 failure REAL_EXIT=2 - - MUTANT B: tools/call refused unless initialized? (falsifies "served bare") - match before: 1, old remaining: 1 <- NOT zero, and that is fine - 8 tests, 3 failures REAL_EXIT=2 - -**Mutant B's `old remaining: 1` is not a failed mutation.** The replacement clause embeds the -original line, so the source-level count could not fall to zero and carried no information. What -proves the mutant applied is the **effect** — three tests going red, including the two pinning -the claim. This is SCR-259's rule reached from the other side: assert the effect, not only the -match count. A source check that cannot distinguish applied from unapplied is exactly as good as -no check, and reporting `old remaining: 1` as a failure would have been as wrong as reporting an -unapplied mutant as a survivor. - -## Base re-derived rather than assumed - -PR #7 merged while this round was in flight. The merge method is rebase, so `main` carries -`0332c41` — a **rewritten** commit, not this branch's `a05e018`, which is therefore not an -ancestor of `main`. Checked rather than assumed: - - git rev-parse a05e018^{tree} a866ad8de07a2706735c025e98a3305c083e011b - git rev-parse origin/main^{tree} a866ad8de07a2706735c025e98a3305c083e011b - git diff a05e018 origin/main (empty) - -Identical trees, so the content landed exactly and the local commit was a duplicate. The branch -was reset onto `origin/main` and the release work continues as `slice/001b-release-0-2-0`. -`main` currently carries the fix under `0.1.2`; this branch moves it to `0.2.0`. - -## The tally caught its author, on its first live encounter - -The closing tally added in round 6 exists because a rewrite silently dropped `red.txt` from the -sweep. Its first encounter with a genuinely new file was this round, and it fired: - - enumerated : 26 - classified : 25 (11 verdicts + 14 authored lane reports) - => TALLY FAILS: 1 enumerated file(s) unclassified. - sweep exit=1 - -The unclassified file was `mutation-readme.txt`, which **I had just added and not taught the -sweep about** — precisely the round-5 regression, committed again by the same author who built -the guard against it, one round later. Without the tally it would have gone past exactly as -before: nothing else in the output changes, and every printed verdict stays `RAW`. - -**And the file it caught was worse than unclassified.** Inspecting it once the tally forced the -question: it was built with `{ … } | tee` wrapping `mix test … | grep -E`, so it was a filtered -capture — **instance #4 of the archive family**, in a log created to prove tests that pin claims -against being unfalsifiable. Deleted and re-taken as `mutation-readme-a.txt` and -`mutation-readme-b.txt`, each `mix test … > file 2>&1`, no pipe, both carrying the seed banner -and complete failure bodies. - -So the tally did not merely catch a bookkeeping slip. **It surfaced a defect of the class the -whole instrument exists for, in a file whose existence nobody but the author knew about**, by -refusing to balance. That is the difference between a check that reports in a column and a check -that fails: the column would have said `RAW` for every file it looked at and said nothing at all -about the one it did not. - -Recorded because the honest reading is not "the guard worked". It is that the same author -reintroduced the same defect one round after building the guard, and the only reason it is in -this paragraph rather than in the tree is that the guard was built to fail rather than to report. diff --git a/slices/001b-ping-guard/PLAN.md b/slices/001b-ping-guard/PLAN.md deleted file mode 100644 index 8c71d78b..00000000 --- a/slices/001b-ping-guard/PLAN.md +++ /dev/null @@ -1,239 +0,0 @@ - - -# Slice 001b — the `_meta` era guard: `ping`, and the result shape that goes with it - -**Written before any edit to `lib/`.** Sub-slice of 001, per the letter-suffix convention: a -defect found in slice 001's revision-negotiation work after it merged and after `0.1.0` -published. Issue: SCR-257. - -**Every specification claim below was fetched on 2026-09-06 from -`https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning` and -`.../changelog`, not recalled.** The `2026-07-28` revision post-dates this agent's training -data, so nothing here is asserted from memory. - -**Every page quoted anywhere in this slice is archived, by a command that fetched it** — -`curl -sSL --fail … -o `, so the bytes are the source's bytes: - - logs/spec-basic-versioning.md 2026-07-28 versioning and compatibility - logs/spec-changelog.md 2026-07-28 key changes - logs/spec-legacy-basic.md 2025-11-25 base protocol - -Added in round 2: r2 was right that "fetched, not recalled" is an unverifiable process assertion -when the quotes it licenses are the load-bearing evidence for the whole decision, and that citing -the URL was permitted but weaker than archiving at no extra cost. The third page was added in -round 3, on r2's finding 5: round 2's correction about `resultType` leaned on `2025-11-25`'s base -page, and the sentence above claimed *both* pages were archived while a third had quietly become -load-bearing. - -## Where the probe runs - -`/home/aylac/Projects/beam_mcp-wt/001b-ping-guard` — a `git worktree` off `main` at `5d8d1ae`, -with its own `_build` and `deps`. The canonical clone at `/home/aylac/Projects/beam_mcp` is -not written to by any probe in this slice. The probe script itself lives outside the tree, in -the session scratchpad, so it is never a tracked file and never enters the gate's REUSE -population by accident. - -## The defect, measured - -`mix run` against the worktree at `5d8d1ae`, `mix.exs` version `0.1.1`, each message the first -and only one handed to a fresh `Server.new/1` state: - - ping + _meta 2026-07-28 - -> {"error":{"code":-32601,"message":"Method not found: ping"},"id":1,"jsonrpc":"2.0"} - ping + _meta 2025-11-25 - -> {"error":{"code":-32601,"message":"Method not found: ping"},"id":1,"jsonrpc":"2.0"} - ping + _meta, no version key - -> {"id":1,"jsonrpc":"2.0","result":{}} - ping bare - -> {"id":1,"jsonrpc":"2.0","result":{}} - -Line 2 is the defect. Line 3 is the **measured boundary**: a `_meta` that carries no -`io.modelcontextprotocol/protocolVersion` does not match the clause head at all and falls -through to the bare handler, so the defect is specific to a `_meta` that names a revision. - -`lib/beam_mcp/server.ex:120-135`: - -```elixir -def handle_message( - state, - %{"jsonrpc" => "2.0", "id" => id, "_meta" => %{@version_meta_key => version}} = message - ) do - cond do - version not in @supported_versions -> - {state, unsupported_version(id, version)} - - # ping was removed in 2026-07-28. The legacy handler must not inherit it. - message["method"] == "ping" -> - {state, error(id, -32_601, "Method not found: ping")} - - true -> - {next, response} = handle_message(state, Map.drop(message, ["_meta"])) - {next, modernise(response, state)} - end -end -``` - -The guard tests the method and nothing else. The comment names `2026-07-28`; the code names no -revision. Every supported revision reaching this clause takes the refusal branch. - -## The second half of the same defect, found while measuring, not in SCR-257 - -The same clause modernises **every** result it produces, on the same version-blind basis: - - tools/list + _meta 2025-11-25 - -> {"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo": - {"name":"beam_mcp","version":"0.1.1"}},"resultType":"complete","tools":[...]}} - -A request that declared `2025-11-25` is answered with a result carrying `resultType` and -modern `_meta` `serverInfo` — two fields `2026-07-28` introduced and `2025-11-25` does not -define. This is the mirror image of the defect slice 001 was written to close, which was a -modern request answered in a legacy shape. It is the same root cause as the `ping` guard — -one `cond` that branches on the method but never on `version` — so it is in scope here rather -than filed onward. Fixing only `ping` would leave the clause still version-blind. - -## What the specification says - -From **Versioning and Compatibility**, `2026-07-28`: - -> Every request declares the protocol version it is using in its `_meta` field. - -> If the server does not implement the requested version (whether the version is unknown to -> the server, or is a known version the server has chosen not to support), it **MUST** respond -> with an `UnsupportedProtocolVersionError` listing the versions it does support - -with the page's own example carrying `"supported": ["2026-07-28", "2025-11-25"]`, and: - -> The client **SHOULD** select a mutually supported version from the `supported` list and -> retry the request - -> A dual-era **server** selects its behavior from how the client opens: -> * A request carrying modern per-request `_meta` is served statelessly according to this -> revision. -> * An `initialize` request selects legacy semantics [...] - -From the **changelog**, `2026-07-28`: - -> 5. Remove `ping`, `logging/setLevel`, and `notifications/roots/list_changed`. - -> 8. All results now carry a required `resultType` field [...] Clients **MUST** treat results -> from earlier-protocol servers that omit the field as `"complete"`. - -## The decision, and why the other two shapes lose - -Three shapes are defensible. They are not equally honest. - -**(A) — chosen. The `_meta` clause branches on the declared version.** `2026-07-28` refuses -`ping` and modernises; `2025-11-25` answers `ping` and does **not** modernise; anything else is -`-32022`. - -**(B) — rejected. Refuse any `_meta` naming a legacy revision with `-32022`.** The spec permits -a server to not support a known version, so this is coherent *only for a server that does not -advertise it*. This server does advertise it: `server/discover` returns -`["2026-07-28","2025-11-25"]`, `initialize` answers `2025-11-25`, and the `-32022` payload -itself lists `2025-11-25` as supported. The spec's prescribed client behaviour on `-32022` is -to pick from `supported` and **retry the request** — i.e. resend the same `_meta`-shaped -request naming `2025-11-25`. (B) turns that into an infinite loop against our own advertisement. -Making (B) honest would mean dropping `2025-11-25` from the supported set, which is a different -and much larger change and contradicts the `initialize` path this package already serves. - -**(C) — rejected. Add `and version == @modern_version` to the `ping` guard, change nothing -else.** This is what SCR-257's title implies and it closes the reported symptom. It leaves the -clause answering a request that declared `2025-11-25` with `resultType` and modern `serverInfo` -— it fixes the method table and keeps the wrong envelope. The brief instructs deciding the -shape against the specification rather than against the issue text, and the specification is -explicit that `resultType` is a `2026-07-28` addition which earlier-revision servers omit. - -(A) is the only shape under which the clause's own comment becomes true. - -## Note on "served according to this revision" - -The spec sentence *"a request carrying modern per-request `_meta` is served statelessly -according to this revision"* describes the era discriminator: `_meta` means stateless, not -session. It is read here as fixing the **statelessness**, not as fixing the revision to -`2026-07-28` regardless of what the `_meta` declares — because the same page's negotiation -section says every request declares its version in `_meta` and requires the server to serve or -refuse **that** version, and because the retry loop above only terminates under that reading. -Recorded explicitly because it is the one sentence that could be read to support (B). - -## In scope - -1. `lib/beam_mcp/server.ex` — the `_meta` clause branches on `version`. -2. `test/beam_mcp/negotiation_test.exs` — the red, added and demonstrated failing first. -3. `README.md` — the era table, which currently states the intended rule and not the shipped one. -4. `CHANGELOG.md` — a `0.1.2` section. -5. `mix.exs` — version `0.1.1` -> `0.1.2`. -6. This slice directory. - -## Out of scope, recorded rather than fixed - -- **`ttlMs` and `cacheScope` on `tools/list` results.** `2026-07-28` requires both - (changelog, minor change 5) and `modernise/2` adds neither. Pre-existing since slice 001, - unrelated to the version branch, filed rather than fixed. -- **A `_meta` with no version key is served bare** (line 3 of the measurement). That is the - no-era-established path, which is SCR-255, not this slice. -- Anything about HTTP. That is SCR-253 / slice 002. - -## Acceptance criteria - -1. A `ping` carrying `_meta` `2025-11-25` returns `result` `%{}` — red before the fix, green - after, output of both recorded verbatim from the command. -2. A `ping` carrying `_meta` `2026-07-28` still returns `-32601`. The existing test at - `negotiation_test.exs:145` covers this and must not be edited to pass. -3. A `tools/list` carrying `_meta` `2025-11-25` carries **no** `resultType` and **no** - `_meta` `serverInfo`; the same request at `2026-07-28` carries both. -4. A `_meta` naming an unsupported revision still returns `-32022` with the supported list. -5. `./tools/gate.sh` exits 0, and every step's own line reads `pass`. -6. Two independent reviewer lanes, read-only, on a checkout of the index, report before merge. - -## Version - -`0.1.2`. **`0.1.1` is on `main` and was never published to Hex**, so bumping to `0.1.2` means -`0.1.1` will not exist as a release and its documentation fix ships inside `0.1.2`. The -`CHANGELOG` `0.1.1` section is left as written and the fact is appended under `0.1.2` rather -than rewritten. Flagged to the owner: if `0.1.1` is wanted as a release on its own, that is a -publish that has to happen before this slice merges, and it is an owner step either way. - -## Review binding - -**This repository has no `tools/signoff.sh`.** `tools/` contains `gate.sh` only. There is -therefore **no mechanical binding** between a reviewer's verdict and the bytes committed — no -`Reviewed-diff` trailer, no index-hash check, no hook that refuses an unreviewed commit. The -two lane verdicts are recorded in `slices/001b-ping-guard/` as text, and each lane prints the -tree hash it read into `logs/`, so the binding is *checkable by hand* and is *not enforced*. -Stated plainly rather than implied, because a signoff file that no tool consumes looks like a -control and is not one. - ---- - -## Appended 2026-09-07 — the version is `0.2.0`, superseding the Version section above - -**Owner decision.** The Version section above specifies `0.1.2` and is left exactly as written; -this note supersedes it rather than rewriting it, per the corrections-are-appended rule. - -The reasoning is the one this slice's own `CHANGELOG` entry recorded while still numbered a -patch: a method that answered now refuses for a client declaring `2025-11-25`, and the same -version-blind clause stops stamping `resultType` and modern `serverInfo` onto legacy-declared -results. A consumer can depend on both. For a published package the wire JSON is the API, so -that is a minor bump and not a patch. - -Round-7 scope, fixed before the lanes were dispatched and bounded to exactly this: - -1. `mix.exs` — `0.1.2` -> `0.2.0`. -2. `CHANGELOG.md` — the section heading; the rationale paragraph, which argued for a patch and - is now wrong; and the `0.1.1` note, which must say plainly why published versions jump - `0.1.0` -> `0.2.0`. -3. `logs/probe-after.txt` and the sweep re-taken, because `@server_version` is read from - `mix.exs` and the archived probe output embeds it. -4. This note, and the round-7 record in `FINDINGS.md` and `REVIEW.md`. - -**Nothing else.** No `lib/`, no `test/`, no change to the `### Changed` heading — the owner took -the semver argument from that heading, so softening it now that the number agrees with it would -remove the reasoning that produced the decision. - -**Stale `0.1.2` strings elsewhere are deliberate and must stay.** They appear in the twelve -reviewer-lane reports under `logs/`, which are immutable archives of what each lane read at the -time, and in this slice's own historical record of rounds 1-6. Editing them would falsify the -record to make it tidy, which is the failure mode this whole slice is about. diff --git a/slices/001b-ping-guard/REVIEW.md b/slices/001b-ping-guard/REVIEW.md deleted file mode 100644 index 18186799..00000000 --- a/slices/001b-ping-guard/REVIEW.md +++ /dev/null @@ -1,279 +0,0 @@ - - -# Slice 001b — review record - -## There is no mechanical binding in this repository, and this file is not one - -`tools/` holds `gate.sh`, `probe_ping.exs` and `archive_sweep.sh` — a quality gate and two -evidence instruments. **There is no `tools/signoff.sh`**, no -`Reviewed-diff` commit trailer, no index-hash check, and no hook that refuses a commit whose -diff no reviewer saw. Nothing in this repository's gates or CI reads this file. - -So: this is a **record**, not a control. It is checkable by hand and it is not enforced. Stated -first and plainly, because a file named `REVIEW.md` sitting next to a `PLAN.md` in a tree whose -sibling has a real signoff mechanism will be read as a control unless it says otherwise, and a -control that does not exist is worse than a known gap. - -What *is* mechanical, and is the closest thing here to a binding: - -- Both lanes reviewed a checkout of the **index**, not the working tree. What a lane can - attest is that it ran `git write-tree` in the checkout it read and got the hash below; that - the checkout was built by `git archive` into a directory created empty and verified empty is - the coding agent's step, which **no lane witnessed** (r1 round-3 finding 5). Separated because - a file whose first section is about not letting a record read as a control should not attribute - an unwitnessed step to the reviewers. -- Both lanes printed the tree hash they read, and both printed the same one, and it equalled - `git write-tree` on the staged index: - - round 1: a42f1b1e82599b203df0afcaaa8639203fd663d7 (r1 = r2 = index) - round 2: 867f28cecbf790f17e7a43747c74cbc3c5990033 (index at time of dispatch) - round 3: 7772c2a8d4bc6feefd96234c696ce4ccb9209d38 (index at time of dispatch) - round 4: see the commit; lib/ and test/ unchanged since 867f28ce - - Round 3's hash was missing from this list while the file described round 3 at length — - r2 round-3 finding 4. If the list is the binding, it carries every round it binds. - -- r1 re-ran `git write-tree` at the **end** of its round-1 review and got the same hash, so the - index did not move under it mid-review. That is the failure this practice exists to prevent. - -## Lanes - -Two, spawned by the coding agent, read-only, adversarial, and told to report findings rather -than edit. Neither edited a file under review. - -| lane | remit | -|---|---| -| r1 | correctness and specification conformance | -| r2 | security, contract, and evidence integrity | - -## Round 1 — both lanes: changes required - -Full reports, **written by each lane itself** into `logs/round1.r1.md` and `logs/round1.r2.md`. -They are archives in this project's sense: the bytes are the reviewer's bytes, because the -reviewer wrote the file. They were not transcribed by the coding agent, which could not have -labelled them verbatim if it had. r2's archive additionally names, in a header comment, the two -conversational lines it omitted — an omission declared rather than silent. - -**Neither lane raised a finding against `lib/`'s logic.** Quoting r2's round-1 close: "The -`lib/` change is correct, minimal, and I found nothing to fix in it." And r1's: "The fix itself -is correct, minimal, well-argued against the fetched spec, and genuinely demonstrated -red-before-green by mutation. Shape (A) is the right shape and I reach that independently." - -Both nonetheless returned **changes required**, on documentation and evidence: - -| # | lane | severity | what | -|---|---|---|---| -| 2.1 | r1 | **blocking** | the `@moduledoc` still stated the rule the diff deletes | -| 4 | r1 | non-blocking | `shutdown` through the new legacy branch was untested; every test discarded the returned state | -| 1c | r1 | non-blocking | a changelog-item-8 inference was presented beside two quoted MUSTs as if it were a third | -| 2.2 | r1 | non-blocking | the new README claim had two reachable counterexamples | -| 2.3 | r1 | note | `modernise/2` was handed the pre-recursion state | -| 6.1 | r1 | non-blocking | three counts in FINDINGS were typed fresh and wrong | -| 6.3 / 1 | r1 note, r2 non-blocking | `probe-after.txt` measured `0.1.1`, not the tree being shipped | -| 6.4 / 6 | both | note | the PLAN's fetch date was one day in the future, and the fetch had no archive | -| 2 | r2 | non-blocking | the README asserted an envelope invariant a one-command probe falsifies on a mandatory method | -| 3 | r2 | non-blocking | a wire-visible field removal shipped under `### Fixed` with no removal label | -| 4 | r2 | note | the README's "session: yes" is tracked and never enforced | -| 5 | r2 | note | the new clause comment overstated the clause's reach | -| 7 | r2 | note | a line-number citation stale in the merged tree | -| 8, 9 | r2 | note | gate REUSE population and `-32022` echo — both out of scope | - -The most useful finding is r1's 2.1, and it is worth naming why: round 1 fixed a comment that -contradicted the code, and left the **moduledoc** contradicting the code. Round 1's README -rewrite then committed the same class of error a second time (r1 2.2, r2 2) by replacing a -paragraph that overstated the rule with another paragraph that overstated it. A slice about a -comment that outlived its code reintroduced the defect twice while fixing it. That is the -argument for adversarial review stated better than any policy sentence. - -## Round 2 — a split verdict, which is not a pass - -Tree `867f28cecbf790f17e7a43747c74cbc3c5990033`. Full reports at `logs/round2.r1.md` and -`logs/round2.r2.md`, each written by its own lane. - - r1: VERDICT: approve (5 new findings, all non-blocking or note) - r2: VERDICT: changes required (1 blocking, 4 non-blocking) - -**A split is not a pass, and was not treated as one.** r2's blocking finding stood on its own -and was fixed before any signoff was contemplated. Recording the rule because the tempting -reading of "one approve, one changes-required" is that the approve carries it, and that reading -would have shipped the exact defect r2 found. - -**r2's blocking finding, and it is the sharpest in the slice.** Round 2 re-took -`logs/full-suite.txt` and `logs/green-negotiation.txt` to fix a round-1 finding that an archive -did not describe the tree it shipped with — and re-took them through `| tail -4`, which stripped -`mix test`'s first line (`Running ExUnit with seed: N, max_cases: M`). The counts were right. -The bytes were not the command's bytes. r2 proved it by `diff` against a fresh run (`1d0`) and -ruled out a configuration explanation before calling it, rather than assuming one. - -So: **the fix for a verbatim-archive finding was itself a verbatim-archive violation**, in the -file offered as proof. That is the family `CONVENTIONS.md` singles out as the worst, because a -filtered archive is indistinguishable from evidence. Neither the author nor r1 caught it; r1 had -re-run both commands and compared *counts*, which is exactly the check that passes over this -defect. It took a lane that compared *bytes*. - -**Both lanes independently found the same over-claim** — "three tests scored by mutation", -evidenced by one mutant — and both then ran the second mutation themselves and both concluded -the third test is unkillable in this diff's mutation space. Two lanes reaching one conclusion by -separate routes is the strongest signal either produced. - -**r2 also found an undisclosed `lib/` change** by mutation rather than by reading the record: -`modernise(response, state)` -> `modernise(response, next)`, whose mutant **survives the whole -suite**. Correctly a survivor — the change is unfalsifiable today and kept as defence against a -latent trap — but round 2's record claimed every change that round was documentation, evidence -or coverage, which the tree falsified. - -## Round 3 — bounded, on the delta - -Scope, fixed before the lanes were dispatched and written here beside the tree: - -1. `logs/full-suite.txt`, `logs/green-negotiation.txt`, `logs/gate.txt` re-taken with - `> file 2>&1` — a redirect, no pipe, no filter. -2. `logs/mutation.txt` added. **This was itself the third instance of the archive defect** — a - curated extract (its `mix test` piped through `grep -E`) carrying a label that claimed - captured output. Both lanes blocked on it in round 3. Round 4 deletes it for - `logs/mutation-a.txt` and `logs/mutation-b.txt`, each `mix test … > file 2>&1`, no pipe. -3. `logs/spec-legacy-basic.md` added — the third page, cited since round 2 and unarchived. -4. `FINDINGS.md`: the mutation sentence corrected to two-of-three; the undisclosed `lib/` change - disclosed and its surviving mutant recorded; the Green block's stale citations removed; the - `.md`-gap item extended to cover the three `spec-*.md` archives. -5. `CHANGELOG.md`: one clause saying `0.1.0` and `0.1.1` name the same before-state. -6. `PLAN.md`: three archived pages, not two. - -**No change to `lib/` or `test/` in round 3.** Both lanes' `lib/` conclusions therefore still -stand on bytes they read. - -## Round 3 — both lanes: changes required, converging on one file - - r1: VERDICT: changes required (1 blocking, 2 non-blocking, 3 notes) - r2: VERDICT: changes required (1 blocking, 2 non-blocking, 1 note) - -**Both lanes blocked on the same file, measured independently.** `logs/mutation.txt`, added *that -round to close the archive family*, was itself a curated extract: its `mix test` ran through -`grep -E`, and the label over it claimed captured output. r1 counted 13 lines stripped per block. - -**Why that is blocking and not cosmetic**, in the lanes' framing rather than mine: what was -dropped is the failure **body** — the assertion message, the `code:` line, the `stacktrace:` -line. Those lines are the evidence that the mutant was killed *by that assertion*, rather than by -a compile error or by nothing at all. Strip them and a killed mutant is indistinguishable on the -page from a suite that failed for an unrelated reason — which is the whole thing mutation scoring -is supposed to establish. - -r2 declined to soften it, and said why: an identical defect on a different file cannot be -blocking one round and a note the next, "or the standard is whatever the reviewer feels like that -morning." - -**r1 retracted its own round-2 approve**, unprompted: *"I checked numbers where the finding was -about bytes."* Recorded because a lane correcting itself against the standard is the review -mechanism working, and because it is the clearest statement of the method error that let instance -#2 through — the same method error that would have let #3 through. - -**Both lanes independently derived nine** headerless tracked `.md` files against a hand-written -count of five, and both observed the four omitted were the four that round added. Same population, -same number, two routes — measured rather than asserted. - -## Round 4 — the population swept, not the instance fixed - -The instruction that changed the approach: *a list is not a population*. Rounds 1-3 fixed one -archive per round and met the next one. Round 4 enumerates **every** file the record labels an -archive and classifies each by comparing it against a fresh capture — `logs/archive-sweep.txt` is -that sweep's own output. - -The sweep is now a tracked script, `tools/archive_sweep.sh`, and **it shows every comparison it -makes** — the diff, and the seed/timing normalisation where it applies one. Its first version -printed three of its verdicts as bare `echo` lines with no diff beneath them, which r2 (round 4, -finding 3) called the shape of evidence rather than evidence: the same family again, inside the -file written to close it. It also filed the three `spec-*.md` pages under "authored prose", which -would have excused never checking the only three files whose source lives outside the tree; they -are captures, and the script now re-fetches and diffs all three against upstream. - -Result, with the diff shown for each: `full-suite.txt`, `green-negotiation.txt` and `gate.txt` -raw and verified by byte diff, not by count. `mutation.txt` is deleted for `mutation-a.txt` and `mutation-b.txt`, each -`mix test … > file 2>&1` with no pipe, both mutations re-run from fresh copies with match counts -asserted and `mix compile --force` before scoring. - -**`probe-after.txt` is byte-identical to a fresh run of the now-tracked `tools/probe_ping.exs` -on a warm build.** Round 4 first recorded this as "differed only by carrying *more* lines", which -is backwards — r2 round-4 finding 1. The archive has **fewer** lines than a cold-build run, -because a cold run additionally emits dependency-compile output that no run of the probe itself -produces. The direction matters more than a wording slip: **fewer lines than the run is the -signature of filtering** — it is exactly what instances #2 and #3 looked like — so it can never -be an acquittal on its own. What acquits this file is the byte-identical match against a warm -run, which is the strongest verdict any file in the slice has. The corrected reasoning is now -printed by the sweep itself rather than only asserted here. Tracking the probe closes r1's -finding 6 rather than only recording it. **Four of the five run-logs are regenerable from the -tree; `red.txt` is not, and correctly so** — it is the failing state *before* the fix, so -regenerating it would mean reverting `lib/`. Round 5 said "all five", wrong by one and in the -direction that flatters: tracking the probe moved one log across, not two. r1's round-3 report -had said four of five *and named the exception*; the record adopted the number and dropped the -exception (r1 round-5, finding 2) — the same defect as adopting r2's "four of five" without -re-deriving it. The `round*.md` files are authored by -their own lanes and the `spec-*.md` files are `curl -o` output; neither is labelled a command -capture of something it is not. - -Record accuracy fixed with it: the attribution above; the severity cell; the forward-reference at -`FINDINGS.md:92` that still said "scored by mutation below" while the text below corrected it; -the `.md` population now derived by command; and `FINDINGS.md` gained the rounds-3-and-4 section -it lacked, so the file that asserts every `logs/` file is a command's bytes now records the three -rounds in which that was not true. - -**No change to `lib/` or `test/` in rounds 3 or 4** — `git diff 867f28ce -- lib -test` is empty. Both lanes' `lib/` conclusions rest on bytes they read at `867f28ce`; that -sentence is the coding agent's inference from the empty diff, not a lane's attestation. - -## Rounds 4, 5, 6 — and the verdict that ended them - - round 4 76452890 r1: changes required r2: approve - round 5 de326400 r1: changes required r2: changes required - round 6 d9b0c01e r1: approve r2: approve - -Rounds 4 and 5 were spent on the **instrument** rather than the evidence: a sweep that shipped a -stale verdict, was untracked and so unre-runnable, compared four of seventeen files, filed three -fetched pages as prose so never checked them, and — in the rewrite that fixed all of that — -dropped `red.txt`, the one archive whose acquittal cannot rest on a diff at all. Round 6 added a -closing tally that exits 1 when the population and the classifications disagree, scored by -mutation rather than asserted. - -Both lanes approved tree `d9b0c01e`. Committed as `a05e018`, PR #7, CI green on both checks. - -## Round 7 — the version, and why it is its own round - -**Owner decision, 2026-09-07: the release is `0.2.0`, not `0.1.2`.** - -That touches `mix.exs` and `CHANGELOG.md`, which are **tracked**, so the tree moves away from -`d9b0c01e` — the tree both lanes actually read. A sign-off held against `d9b0c01e` does not -cover these bytes, and claiming it did would be attesting a tree nobody reviewed. Hence a -bounded round rather than an amendment. - -**A correction to how that risk is usually described here.** There is no `tools/signoff.sh` in -this repository to refuse such a sign-off, re-derived rather than re-asserted: - - $ git ls-files tools/ - tools/archive_sweep.sh - tools/gate.sh - tools/probe_ping.exs - -The opening section's load-bearing half — no signoff mechanism — holds. Its other half said -`tools/` contained `gate.sh` "and nothing else", which stopped being true in round 4 and again in -round 5 when lane findings added the other two, and round 7 re-certified it without running the -command above. That is the fresh-count family in the shape absolutes always take: written true, -never re-checked, and read as background rather than as measurement. Nothing mechanical would have stopped an amendment; the round happens because the rule is -being followed, not because a tool enforces it. Worth stating plainly, because "the tool would -have refused" is a comfortable thing to believe about a control that does not exist here. - -Scope, fixed before dispatch and bounded to exactly this: `mix.exs`; the `CHANGELOG` heading, -its now-wrong patch rationale, and the `0.1.1` note; the regenerated `probe-after.txt` and -sweep, since `@server_version` is compiled from `mix.exs`; and the round-7 records. **No `lib/`, -no `test/`, and no change to the `### Changed` heading** — the owner took the semver argument -from that heading, so softening it now that the number agrees would delete the reasoning that -produced the decision. - -Verdicts land in `logs/round7.r1.md` and `logs/round7.r2.md`. **If those files are absent, round -7 did not complete and the version bump is not signed off.** Read absence as absence; this file -is a record of what was reviewed, never a substitute for a verdict. - -## What the coding agent did not do - -It did not review its own diff, and it did not commit anything on a changes-required verdict. diff --git a/slices/001b-ping-guard/logs/archive-sweep.txt b/slices/001b-ping-guard/logs/archive-sweep.txt deleted file mode 100644 index 207f8d73..00000000 --- a/slices/001b-ping-guard/logs/archive-sweep.txt +++ /dev/null @@ -1,168 +0,0 @@ -=== POPULATION, derived from the tracked set rather than listed === - slices/001b-ping-guard/logs/archive-sweep.txt - slices/001b-ping-guard/logs/full-suite.txt - slices/001b-ping-guard/logs/gate.txt - slices/001b-ping-guard/logs/green-negotiation.txt - slices/001b-ping-guard/logs/mutation-a.txt - slices/001b-ping-guard/logs/mutation-b.txt - slices/001b-ping-guard/logs/mutation-readme-a.txt - slices/001b-ping-guard/logs/mutation-readme-b.txt - slices/001b-ping-guard/logs/probe-after.txt - slices/001b-ping-guard/logs/red.txt - slices/001b-ping-guard/logs/round1.r1.md - slices/001b-ping-guard/logs/round1.r2.md - slices/001b-ping-guard/logs/round2.r1.md - slices/001b-ping-guard/logs/round2.r2.md - slices/001b-ping-guard/logs/round3.r1.md - slices/001b-ping-guard/logs/round3.r2.md - slices/001b-ping-guard/logs/round4.r1.md - slices/001b-ping-guard/logs/round4.r2.md - slices/001b-ping-guard/logs/round5.r1.md - slices/001b-ping-guard/logs/round5.r2.md - slices/001b-ping-guard/logs/round6.r1.md - slices/001b-ping-guard/logs/round6.r2.md - slices/001b-ping-guard/logs/round7.r1.md - slices/001b-ping-guard/logs/round7.r2.md - slices/001b-ping-guard/logs/spec-basic-versioning.md - slices/001b-ping-guard/logs/spec-changelog.md - slices/001b-ping-guard/logs/spec-legacy-basic.md - -Two kinds of file live here, and only one kind can be diffed against a command: - CAPTURES - a command wrote them; re-run the command and compare bytes. - Includes the spec-*.md files: 'curl -o' IS the command and the - upstream page IS the source, so they are checkable, not prose. - AUTHORED - the round*.md lane reports. Each was written by the reviewer that - is its source. Nothing to re-run; they must simply never be - labelled the output of a command. - -=== warming the build so comparisons do not depend on _build state === - $ mix compile --force ; mix test --exclude all (output discarded; only the - build state matters here, and a cold build emits compile lines no archive contains) - -=== CAPTURES: test and gate logs === --- full-suite.txt: diff vs a fresh 'mix test', seed+timing normalised on BOTH sides -- - comparison: 0 differing line(s), diff exit=0 - => full-suite.txt RAW (0 differing lines above; seed/timing/compile normalised) - --- green-negotiation.txt: same command, same normalisation -- - comparison: 0 differing line(s), diff exit=0 - => green-negotiation.txt RAW (0 differing lines above) - --- gate.txt: no normalisation, the gate emits nothing variable -- - comparison: 0 differing line(s), diff exit=0 - => gate.txt RAW (0 differing lines above; no normalisation applied) - -=== CAPTURES: the probe === --- probe-after.txt vs a WARM fresh run of the tracked probe, no normalisation -- - comparison: 0 differing line(s), diff exit=0 - => probe-after.txt RAW (byte-identical to a warm run) - NOTE, and the direction matters: against a COLD _build the same command emits extra - dependency-compile lines, so the archive would have FEWER lines than that run. - Fewer-lines-than-the-run is the SIGNATURE OF FILTERING -- it is exactly what was - found in instances #2 and #3 -- so it is never on its own an acquittal. What - acquits this file is the byte-identical match against a warm run above. - -=== CAPTURES: red.txt, the red half of red-before-green === - RESTORED in round 6. The round-4 sweep classified this file; the round-5 rewrite - enumerated it and classified it nowhere, so a reader scanning for DIFFERS got a clean - bill over a population the instrument had not finished. An unclassified file is not a - RAW file. That is CONVENTIONS.md's 'proves nothing, and proves it quietly' shape, and - it is the coverage regression r2 blocked round 5 on -- inside the round that promised - the population. - Not re-runnable here: it is the failing state BEFORE the fix, and lib/ is now fixed. - Reproducing it needs lib/beam_mcp/server.ex reverted to base/main, which this script - must not do to the working tree. Checked instead for the marks a filtered capture - cannot have: - seed banner : 1 - stacktrace: : 2 - code: : 2 - Finished in : 1 - tests, line : 12 tests, 2 failures - => red.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the two mutation logs === --- mutation-a.txt -- - not re-run here: reproducing it needs a mutated copy of lib/, which this script - must not create in the working tree. Checked instead for the marks a filtered - capture cannot have -- the ExUnit banner and a complete failure body: - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 15 tests, 1 failure - => mutation-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) --- mutation-b.txt -- - not re-run here: reproducing it needs a mutated copy of lib/, which this script - must not create in the working tree. Checked instead for the marks a filtered - capture cannot have -- the ExUnit banner and a complete failure body: - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 15 tests, 1 failure - => mutation-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the README-claim mutation logs === - Same treatment as the mutation logs above and for the same reason: reproducing them - needs a mutated README or lib/, which this script must not create in the working tree. --- mutation-readme-a.txt -- - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 8 tests, 1 failure - => mutation-readme-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) --- mutation-readme-b.txt -- - seed banner : 1 - stacktrace: : 2 - code: : 2 - Finished in : 1 - tests, line : 8 tests, 2 failures - => mutation-readme-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the three specification pages, re-fetched and diffed against upstream === -These are the only files whose source lives OUTSIDE the tree, so they are the only -ones a diff can check against an independent authority. Grouping them with prose -(the first version of this script did) is what would excuse never checking them. - comparison: 0 differing line(s), diff exit=0 - => spec-basic-versioning.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning.md) - comparison: 0 differing line(s), diff exit=0 - => spec-changelog.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/changelog.md) - comparison: 0 differing line(s), diff exit=0 - => spec-legacy-basic.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2025-11-25/basic.md) - -=== AUTHORED: the lane reports === - round1.r1.md written by its own reviewer lane; not a command capture - round1.r2.md written by its own reviewer lane; not a command capture - round2.r1.md written by its own reviewer lane; not a command capture - round2.r2.md written by its own reviewer lane; not a command capture - round3.r1.md written by its own reviewer lane; not a command capture - round3.r2.md written by its own reviewer lane; not a command capture - round4.r1.md written by its own reviewer lane; not a command capture - round4.r2.md written by its own reviewer lane; not a command capture - round5.r1.md written by its own reviewer lane; not a command capture - round5.r2.md written by its own reviewer lane; not a command capture - round6.r1.md written by its own reviewer lane; not a command capture - round6.r2.md written by its own reviewer lane; not a command capture - round7.r1.md written by its own reviewer lane; not a command capture - round7.r2.md written by its own reviewer lane; not a command capture - -=== archive-sweep.txt itself === - A file cannot diff itself while being written, so this entry NAMES ITS CHECK rather - than asserting a conclusion -- the thing this script's own header forbids: - script sha256 : c2686bb80cf66045f62dc647b6826e5fef58cd51c4611202c641a21c492bdc63 - reproduce : ./tools/archive_sweep.sh > slices/001b-ping-guard/logs/archive-sweep.txt 2>&1 - then diff that against the tracked file. A reader who doubts any verdict above - re-runs that one line; the script is tracked, so the bytes that produced this - output are in the tree next to it. - => archive-sweep.txt RAW (self: named check above, not an assertion) - -=== CLOSING TALLY -- the structural fix, not an instance fix === - Round 5 enumerated red.txt and classified it nowhere: 19 listed, 18 classified, and - the output still read as a clean sweep because nothing counted. A file could drop out - QUIETLY -- CONVENTIONS.md's own worst shape, and this script's header says a list is - not a population. So the population and the classifications are now counted and - compared, and disagreement is a FAILURE of this script rather than a silent gap. - enumerated : 27 - classified : 27 (13 verdicts + 14 authored lane reports) - => TALLY BALANCES: every enumerated file is classified. diff --git a/slices/001b-ping-guard/logs/full-suite.txt b/slices/001b-ping-guard/logs/full-suite.txt deleted file mode 100644 index 03dce8b6..00000000 --- a/slices/001b-ping-guard/logs/full-suite.txt +++ /dev/null @@ -1,5 +0,0 @@ -Running ExUnit with seed: 685989, max_cases: 64 - -............................................... -Finished in 1.0 seconds (0.05s async, 0.9s sync) -47 tests, 0 failures diff --git a/slices/001b-ping-guard/logs/gate.txt b/slices/001b-ping-guard/logs/gate.txt deleted file mode 100644 index f52f6c31..00000000 --- a/slices/001b-ping-guard/logs/gate.txt +++ /dev/null @@ -1,8 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - reuse pass (20 commentable files) - licence files pass -Gate OK. diff --git a/slices/001b-ping-guard/logs/green-negotiation.txt b/slices/001b-ping-guard/logs/green-negotiation.txt deleted file mode 100644 index 7068d9fb..00000000 --- a/slices/001b-ping-guard/logs/green-negotiation.txt +++ /dev/null @@ -1,5 +0,0 @@ -Running ExUnit with seed: 92511, max_cases: 64 - -............... -Finished in 0.04 seconds (0.04s async, 0.00s sync) -15 tests, 0 failures diff --git a/slices/001b-ping-guard/logs/mutation-a.txt b/slices/001b-ping-guard/logs/mutation-a.txt deleted file mode 100644 index ba606195..00000000 --- a/slices/001b-ping-guard/logs/mutation-a.txt +++ /dev/null @@ -1,16 +0,0 @@ -Compiling 5 files (.ex) -Generated beam_mcp app -Running ExUnit with seed: 814630, max_cases: 64 - -... - - 1) test state threads through both era branches shutdown declaring 2025-11-25 through _meta still sets shutdown? (BeamMCP.NegotiationTest) - test/beam_mcp/negotiation_test.exs:184 - the legacy branch returns the recursion's tuple whole; if it returned the pre-recursion state instead, the transport would never stop - code: assert Server.shutdown?(send_for_state(legacy_meta("shutdown"))), - stacktrace: - test/beam_mcp/negotiation_test.exs:185: (test) - -........... -Finished in 0.03 seconds (0.03s async, 0.00s sync) -15 tests, 1 failure diff --git a/slices/001b-ping-guard/logs/mutation-b.txt b/slices/001b-ping-guard/logs/mutation-b.txt deleted file mode 100644 index 9b67b065..00000000 --- a/slices/001b-ping-guard/logs/mutation-b.txt +++ /dev/null @@ -1,28 +0,0 @@ -Compiling 5 files (.ex) -Generated beam_mcp app -Running ExUnit with seed: 924753, max_cases: 64 - -.... - - 1) test state threads through both era branches shutdown declaring 2026-07-28 through _meta still sets shutdown? (BeamMCP.NegotiationTest) - test/beam_mcp/negotiation_test.exs:190 - Expected truthy, got false - code: assert Server.shutdown?(send_for_state(modern("shutdown"))) - arguments: - - # 1 - %{ - server_name: "beam_mcp", - dispatch: #Function<0.370214/3 in BeamMCP.NegotiationTest.state/0>, - dispatch_opts: [], - initialized?: false, - shutdown?: false, - tool_catalog: BeamMCP.NegotiationTest.Catalog - } - - stacktrace: - test/beam_mcp/negotiation_test.exs:191: (test) - -.......... -Finished in 0.03 seconds (0.03s async, 0.00s sync) -15 tests, 1 failure diff --git a/slices/001b-ping-guard/logs/mutation-readme-a.txt b/slices/001b-ping-guard/logs/mutation-readme-a.txt deleted file mode 100644 index d70dfcf8..00000000 --- a/slices/001b-ping-guard/logs/mutation-readme-a.txt +++ /dev/null @@ -1,18 +0,0 @@ -Compiling 5 files (.ex) -Generated beam_mcp app -Running ExUnit with seed: 281372, max_cases: 64 - -.... - - 1) test the dependency requirement the README hands a consumer it does not span the wire break this release documents (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:80 - the README no longer contains the sentence this test pins: - {:beam_mcp, "~> 0.2"} - Either the claim moved and this test must move with it, or the claim was deleted and so should this test. A test pinning a sentence nobody makes is worse than no test, because it reads as coverage. - code: claims(~s({:beam_mcp, "~> 0.2"})) - stacktrace: - test/beam_mcp/readme_claims_test.exs:81: (test) - -... -Finished in 0.03 seconds (0.03s async, 0.00s sync) -8 tests, 1 failure diff --git a/slices/001b-ping-guard/logs/mutation-readme-b.txt b/slices/001b-ping-guard/logs/mutation-readme-b.txt deleted file mode 100644 index 9d3e016d..00000000 --- a/slices/001b-ping-guard/logs/mutation-readme-b.txt +++ /dev/null @@ -1,27 +0,0 @@ -Compiling 5 files (.ex) -Generated beam_mcp app -Running ExUnit with seed: 284997, max_cases: 64 - -.... - - 1) test methods available at both eras tools/call and shutdown are served under either declared revision (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:182 - tools/call at 2026-07-28 - code: for version <- [@modern, @legacy] do - stacktrace: - test/beam_mcp/readme_claims_test.exs:191: anonymous fn/1 in BeamMCP.ReadmeClaimsTest."test methods available at both eras tools/call and shutdown are served under either declared revision"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/readme_claims_test.exs:185: (test) - -. - - 2) test the session is tracked, not enforced every method is served bare, tools/call included, and tools/call reaches dispatch (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:139 - no initialize, no _meta, no session -- and it executes. This is the package's stated contract, not an accident, and the README says refusing unestablished callers is the host's job. Pinned so that neither adding nor removing that refusal can happen silently. - code: assert r["result"]["isError"] == false, - stacktrace: - test/beam_mcp/readme_claims_test.exs:151: (test) - -. -Finished in 0.03 seconds (0.03s async, 0.00s sync) -8 tests, 2 failures diff --git a/slices/001b-ping-guard/logs/probe-after.txt b/slices/001b-ping-guard/logs/probe-after.txt deleted file mode 100644 index 95b1854c..00000000 --- a/slices/001b-ping-guard/logs/probe-after.txt +++ /dev/null @@ -1,14 +0,0 @@ -beam_mcp version: 0.2.0 - -ping + _meta 2026-07-28 - -> {"error":{"code":-32601,"message":"Method not found: ping"},"id":1,"jsonrpc":"2.0"} -ping + _meta 2025-11-25 - -> {"id":1,"jsonrpc":"2.0","result":{}} -ping + _meta, no version key - -> {"id":1,"jsonrpc":"2.0","result":{}} -ping bare - -> {"id":1,"jsonrpc":"2.0","result":{}} -tools/list + _meta 2025-11-25 - -> {"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}]}} -tools/list + _meta 2026-07-28 - -> {"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"beam_mcp","version":"0.2.0"}},"resultType":"complete","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}]}} diff --git a/slices/001b-ping-guard/logs/red.txt b/slices/001b-ping-guard/logs/red.txt deleted file mode 100644 index 0d5f3074..00000000 --- a/slices/001b-ping-guard/logs/red.txt +++ /dev/null @@ -1,38 +0,0 @@ -==> file_system -Compiling 7 files (.ex) -Generated file_system app -==> bunt -Compiling 2 files (.ex) -Generated bunt app -==> jason -Compiling 10 files (.ex) -Generated jason app -==> credo -Compiling 257 files (.ex) -Generated credo app -==> beam_mcp -Compiling 5 files (.ex) -Generated beam_mcp app -Running ExUnit with seed: 719196, max_cases: 64 - -....... - - 1) test the result envelope follows the declared revision, not the carrier a result for a request declaring 2025-11-25 carries neither (BeamMCP.NegotiationTest) - test/beam_mcp/negotiation_test.exs:186 - resultType was added in 2026-07-28; the spec says clients MUST treat results from earlier-protocol servers that omit it as "complete", so emitting it on a 2025-11-25 result claims a revision the client did not ask for - code: refute r["result"]["resultType"], - stacktrace: - test/beam_mcp/negotiation_test.exs:191: (test) - -.. - - 2) test ping — answered at legacy, absent at modern a ping declaring 2025-11-25 through _meta is answered (BeamMCP.NegotiationTest) - test/beam_mcp/negotiation_test.exs:167 - ping exists in 2025-11-25. This server advertises 2025-11-25 in server/discover and lists it in the -32022 `supported` payload, and the specification tells a client to pick from that list and retry the request — which produces this message. Refusing it refuses a revision we advertise. - code: assert r["result"] == %{}, - stacktrace: - test/beam_mcp/negotiation_test.exs:170: (test) - -. -Finished in 0.03 seconds (0.03s async, 0.00s sync) -12 tests, 2 failures diff --git a/slices/001b-ping-guard/logs/round1.r1.md b/slices/001b-ping-guard/logs/round1.r1.md deleted file mode 100644 index 089045a3..00000000 --- a/slices/001b-ping-guard/logs/round1.r1.md +++ /dev/null @@ -1,231 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 1, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review && git write-tree -a42f1b1e82599b203df0afcaaa8639203fd663d7 -``` - -Written to `/home/aylac/Projects/beam_mcp-wt/001b-review/logs-r1.tree`. Re-checked at the end of the review: `git write-tree` still `a42f1b1e82599b203df0afcaaa8639203fd663d7`, so the index did not move under me. Only untracked files present are `logs-r1.tree` and `logs-r2.tree`. - -Spec fetched, not recalled, on 2026-09-06: `.../2026-07-28/basic/versioning`, `.../2026-07-28/changelog`, and `.../2025-11-25/basic/index`. - ---- - -## 1. Is the chosen behaviour right? (A) yes; rejection of (B) holds; rejection of (C) is right on design but is **not** the MUST the record implies - -**Severity: note (two sub-points), one non-blocking (1c).** - -**(a) (A) is defensible, and I reach that independently.** The versioning page says "Every request declares the protocol version it is using in its `_meta` field" and "If the server does not implement the requested version ... it **MUST** respond with an `UnsupportedProtocolVersionError` listing the versions it does support", with the page's own example carrying `"supported": ["2026-07-28", "2025-11-25"]`, and "The client **SHOULD** select a mutually supported version from the `supported` list and retry the request." This server *does* implement `2025-11-25`, and says so twice — verified live, not read: - -``` -1. server/discover + _meta modern - -> {"result":{"protocolVersions":["2026-07-28","2025-11-25"],...}} -18. _meta version = null - -> {"error":{"code":-32022,"data":{"requested":null,"supported":["2026-07-28","2025-11-25"]},...}} -``` -(`mix run` probe against the reviewed `server.ex`, full output below in §4.) - -**(b) (B) is incoherent for *this* server, so its rejection holds.** Answering `-32022` to a `_meta` naming `2025-11-25` would be a response whose own `data.supported` field asserts support for the version the same response is refusing. The one sentence that could support (B) — "A request carrying modern per-request `_meta` is served statelessly according to this revision" — sits under *Backward Compatibility with Initialization-Based Versions*, in a bullet pair whose contrast is **stateless vs. session** ("An `initialize` request selects legacy semantics, scoped to the stdio process (stdio) or the session (HTTP)"). PLAN.md:137-145 reads it as fixing statelessness, not the revision. I agree, and I add the argument the PLAN does not make: under (B) the spec-prescribed retry loop is non-terminating *against this server's own advertisement*, which the spec cannot intend. - -**(c) The rejection of (C) is right, but the record overstates its basis. Non-blocking.** -`slices/001b-ping-guard/FINDINGS.md:51-53` says the `2026-07-28` changelog item 8 MUST "is only coherent if an earlier-revision result omits it". That is an inference, presented adjacent to two verbatim quoted MUSTs. Two spec facts cut against reading it as normative: -- Changelog item 8's MUST is addressed to **clients** ("Clients **MUST** treat results from earlier-protocol servers that omit the field as `"complete"`"), not to servers, and it governs *omission*, not *emission*. -- `2025-11-25`'s own base-protocol page states of a result response: "The `result` **MAY** follow any JSON object structure." `_meta` is a reserved-but-permitted property in that revision. So shape (C) — keeping `resultType` and `_meta` `serverInfo` on a `2025-11-25` result — would have violated **no** normative requirement in either revision. - -So (C) loses on honesty (it decorates a result with fields the declared revision does not define), not on conformance. (A) remains the right shape; the FINDINGS sentence should be softened to say so. No different shape is right. - ---- - -## 2. Does the code do what the PLAN and CHANGELOG say? - -### Finding 2.1 — **BLOCKING.** The moduledoc still states the rule this diff deletes - -`lib/beam_mcp/server.ex:16-18` (unchanged by the diff; its truth-value was flipped by it): - -> a request carrying per-request `_meta` is served statelessly under **the modern revision**, and an `initialize` request selects legacy semantics. - -**Observed:** after this change a `_meta` naming `2025-11-25` is served under the **legacy** revision — that is the entire point of the slice. **Expected:** the module's published documentation says what the module does. This is the `@moduledoc`, i.e. the hexdocs front page for `BeamMCP.Server`; it is the highest-visibility statement of this rule in the package, and it now asserts the pre-fix behaviour. The inline clause comment (`server.ex:119-124`) and `README.md` were both updated; the moduledoc was missed. - -This is exactly the defect class the slice exists to close. `FINDINGS.md:19-21` describes the bug as "the comment named `2026-07-28`; the code names no revision". Shipping a moduledoc that names the modern revision while the code no longer does is the same mismatch, one file up. `CONVENTIONS.md:8` — "each entry exists because something went wrong once" — and PLAN.md in-scope item 3 (documentation of the era rule) both put this inside the slice, not outside it. - -``` -$ sed -n '16,18p' lib/beam_mcp/server.ex - It serves `2026-07-28` and `2025-11-25`, and tells them apart the way the specification says - a dual-era server should: a request carrying per-request `_meta` is served statelessly under - the modern revision, and an `initialize` request selects legacy semantics. A request naming -$ git diff base/main HEAD -- lib/beam_mcp/server.ex | grep -c '^@@ -1[0-9][0-9]' -1 # the only hunk starts at line 116; the moduledoc is untouched -``` - -### Finding 2.2 — non-blocking. Two clause-ordering counterexamples falsify the newly-added README claim - -`README.md:101-103` (new in this diff): "**A revision, not a carrier, decides the semantics.** ... Which revision the `_meta` *names* then decides **the method table and the result envelope**." - -Both halves have a reachable counterexample, because `server/discover` (`server.ex:92`) and `initialize` (`server.ex:102`) are matched **before** the `_meta` clause (`server.ex:125`), and their patterns permit an extra `_meta` key: - -``` -# method table: `initialize` is removed in 2026-07-28, and README.md:99 says it is "at legacy only" -4. initialize + _meta modern (params protocolVersion 2026-07-28) - resp -> {"result":{"protocolVersion":"2026-07-28","capabilities":{...},"serverInfo":{...}},"id":1,...} - shutdown?-> false initialized?-> true - -# result envelope: server/discover is MANDATORY in 2026-07-28 and its result carries neither decoration -1. server/discover + _meta modern - resp -> {"id":1,"jsonrpc":"2.0","result":{"capabilities":{...},"protocolVersions":[...],"serverInfo":{...}}} -``` - -Observed: a request declaring `2026-07-28` gets a successful `initialize` handshake claiming `2026-07-28` — a revision in which `initialize` does not exist — and it flips `initialized?` to `true`, i.e. a request that declared the *stateless* revision mutates session state. And a modern `server/discover` result carries no `resultType`, which changelog item 8 makes required on all results ("All results now carry a required `resultType` field"). Expected per the new README row at `README.md:96` and paragraph at 101-103: `resultType` and `_meta` `serverInfo` on every `2026-07-28` result. - -**Both behaviours are pre-existing** (identical clause order at `base/main`) and are legitimately out of this slice's scope. What is *in* scope is that PLAN.md:151 puts README in scope precisely because it "currently states the intended rule and not the shipped one" — and the replacement text has the same property for two of the six methods the same page lists. Either qualify the paragraph ("except `server/discover` and `initialize`, which are matched before the `_meta` clause") or record the two counterexamples under "Out of scope, recorded rather than fixed". Neither is recorded now. - -### Finding 2.3 — no defect. State threading through both new branches is correct - -The brief asked specifically about `shutdown`. Measured, not reasoned: - -``` -6. shutdown + _meta legacy - resp -> {"id":1,"jsonrpc":"2.0","result":{}} - shutdown?-> true initialized?-> false -7. shutdown + _meta modern - resp -> {"result":{"_meta":{...serverInfo...},"resultType":"complete"},...} - shutdown?-> true initialized?-> false -12. exit (no id) + _meta modern - resp -> nil (no response) - shutdown?-> true initialized?-> false -``` - -The legacy branch (`server.ex:145`) returns the recursion's tuple whole, so `next` is propagated. The modern branch (`server.ex:138-139`) destructures and returns `next`. Correct in both. - -**Note (not a finding):** `server.ex:139` passes the **pre-recursion** `state` to `modernise/2`, not `next`. Harmless today — `modernise/2` reads only `state.server_name`, which no handler mutates — but it is a latent trap if the server name ever becomes mutable. Cheap to change to `next`. - -### Finding 2.4 — no undisclosed silent behaviour change - -I enumerated every path the rewritten clause can take and compared before/after. The only behaviour deltas are (i) `ping` at legacy `_meta`, and (ii) the removal of the decorations for every method reaching the legacy branch — which the CHANGELOG covers with `ping` and `tools/list` as exemplars. `shutdown` and `tools/call` also lose their decorations (probes 6 and 8) and are not individually named, but they are instances of the stated rule, not separate changes. Errors were never modernised (`modernise/2` only matches `%{"result" => payload}`), before or after — verified at probes 9 and 16. Notifications (no `id`) never entered the clause, before or after — probe 10. - -**Both CHANGELOG "before" strings reproduce exactly.** Not taken on trust — measured by reverting `server.ex` to `base/main` in an isolated copy: - -``` -=== BEFORE (server.ex = base/main) === -ping + _meta 2025-11-25 -> {"error":{"code":-32601,"message":"Method not found: ping"},"id":1,"jsonrpc":"2.0"} -tools/list + _meta 2025-11-25 -> {"id":2,...,"result":{"_meta":{"io.modelcontextprotocol/serverInfo":{...}},"resultType":"complete","tools":[...]}} -=== AFTER (server.ex = reviewed) === -ping + _meta 2025-11-25 -> {"id":1,"jsonrpc":"2.0","result":{}} -tools/list + _meta 2025-11-25 -> {"id":2,"jsonrpc":"2.0","result":{"tools":[...]}} -``` - ---- - -## 3. Are the new tests real? Yes — verified by mutation, two of the three - -Method, per the brief: fresh directory created and verified empty (`entry count: 0`), populated by `git archive HEAD | tar -x` (index bytes, not worktree), `deps/`+`_build/` copied, `git init`. Nothing under `deps/` was mutated, so the `deps.compile --force` caveat does not apply. Mutation asserted applied before scoring: - -``` ---- diff line count: 42 (must be > 0) -=== confirm mutant server.ex == base/main:server.ex === -0f649f35823983fbaa27822abd12a90cbbaaed9930d4f9e1b37df1b64922698c - -0f649f35823983fbaa27822abd12a90cbbaaed9930d4f9e1b37df1b64922698c .../mutant/lib/beam_mcp/server.ex -``` - -Control (unmutated copy): `36 tests, 0 failures`, `exit=0`. - -Mutant (`lib/beam_mcp/server.ex` reverted to `base/main`, everything else at the reviewed index): - -``` - 1) test ... a ping declaring 2025-11-25 through _meta is answered - test/beam_mcp/negotiation_test.exs:167 - 2) test ... a result for a request declaring 2025-11-25 carries neither - test/beam_mcp/negotiation_test.exs:186 -12 tests, 2 failures -exit=2 -36 tests, 2 failures # full suite -``` - -Byte-for-byte the same two failures, with the same messages, as `slices/001b-ping-guard/logs/red.txt`. The tests are real and the recorded red is reproducible. - -The **third** new test — `negotiation_test.exs:179`, "a 2026-07-28 result carries resultType and serverInfo `_meta`" — passes at `base/main`. It is a regression guard, not a red. That is fine and desirable; it is the source of the miscount in Finding 6.1. - ---- - -## 4. Under-tested: `shutdown` through the new `@legacy_version` branch - -**Severity: non-blocking.** - -`negotiation_test.exs:43` — `defp send_msg(msg), do: state() |> Server.handle_message(msg) |> elem(1)` — **discards the returned state**. Every test in the file, new and old, throws the state away. So the new `@legacy_version` branch at `server.ex:142-145` returns the recursion's state tuple whole and **no test asserts that it does**. `shutdown` is the specific reachable input: it is the only request method that changes state, it reaches the new branch, and nothing covers it. - -I verified the behaviour is correct (probe 6, above) — this is a coverage gap, not a bug. A one-line test that keeps `elem(0)` and asserts `Server.shutdown?/1` after a `shutdown` carrying legacy `_meta` closes it. Also uncovered but lower value: `tools/call` at legacy `_meta` (probe 8, correct), and the legacy branch's `-32601` for an unknown method (probe 9, unchanged). - -Full probe output (18 inputs, run against the reviewed `server.ex`) is at `/tmp/claude-1000/-home-aylac-Projects-hacktui-hermes/775c8d71-6ac1-4653-8798-382001e76089/scratchpad/r1/`. - ---- - -## 5. The gate — read per step, not by exit code - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review && ./tools/gate.sh; echo "gate exit=$?" -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - reuse pass (17 commentable files) - licence files pass -Gate OK. -gate exit=0 -``` - -All six lines read `pass`; no step printed `pass` while a `FAIL` line appeared elsewhere. Acceptance criterion 5 is met. Byte-identical to `slices/001b-ping-guard/logs/gate.txt`. Note that the `reuse` step derives its population from `git ls-files`, so my untracked `logs-r1.tree` is invisible to it and could not have skewed the `17` — which matches the archived count exactly. - ---- - -## 6. Are the FINDINGS claims supported? Mostly yes; three counts are wrong - -### Finding 6.1 — non-blocking. Three typed-fresh counts in FINDINGS.md are wrong - -`CONVENTIONS.md:70` — "Counts are quoted from command output, never typed fresh." These three were not. - -**(a) `FINDINGS.md:64`** — "Both new tests failed; the **ten** pre-existing tests passed, so the red is the **two** additions and not a broken file." - -Observed: there are **three** new tests and **nine** pre-existing ones. -``` -$ git show base/main:test/beam_mcp/negotiation_test.exs | grep -c '^\s*test ' -9 -$ grep -c '^\s*test ' test/beam_mcp/negotiation_test.exs -12 -``` -The sentence's arithmetic (10 + 2 = 12) is self-consistent and still lands on a true total, which is exactly why it survived. The correct statement is: three additions, two of which are red at `base/main` and one of which (`:179`) is green there as a regression guard. - -**(b) `FINDINGS.md:104`** — "**Four** edits, each applied by a Python replace...". The table immediately under it has **six** rows. - -**(c)** consequently `FINDINGS.md:113`/`114` list `mix.exs` and `CHANGELOG.md` rows that the "four" does not account for. - -### Finding 6.2 — spot-checks that hold - -Re-run by me, not taken on trust: -- `36 tests, 0 failures` (`logs/full-suite.txt`) — reproduced: control run, `exit=0`. ✔ -- `12 tests, 0 failures` (`logs/green-negotiation.txt`) — reproduced. ✔ -- `12 tests, 2 failures` (`logs/red.txt`) — reproduced by mutation, same two tests, same messages. ✔ -- gate, six `pass` lines, `17 commentable files` (`logs/gate.txt`) — reproduced byte-identical. ✔ -- "the pre-existing test at `negotiation_test.exs:145` was not edited" — true; it is now at `:160` and its body is unchanged (`git diff base/main HEAD -- test/` shows only additions, no `-` line in that describe block). Acceptance criterion 2 is met by an unmodified assertion. ✔ - -### Finding 6.3 — note. `logs/probe-after.txt` predates the `mix.exs` bump - -`logs/probe-after.txt` line 3 reads `beam_mcp version: 0.1.1`, and its modern `tools/list` result carries `"version":"0.1.1"`. The reviewed tree's `mix.exs:7` is `0.1.2`, and `@server_version` is read from it (`server.ex:49`), so re-running the same probe now yields `0.1.2`. The log is a genuine command archive of a real intermediate state (fix applied, version not yet bumped), not a transcription — consistent with `CONVENTIONS.md:73-79`. But `FINDINGS.md`'s "## Green" section quotes it as the post-fix state without saying the version bump came after, and a reader diffing the log against the tree will find a version string that exists nowhere in the reviewed bytes. One sentence would close it. Same applies to the CHANGELOG's "Measured against `0.1.1`" block, which is accurate but is the pre-bump run. - -### Finding 6.4 — note. PLAN fetch date is one day in the future - -`PLAN.md:12` — "fetched on **2026-09-07**". Today is 2026-09-06. Probably a timezone or typo; recorded because a fetch date is the load-bearing part of the claim that the `2026-07-28` text was fetched rather than recalled. I independently re-fetched both pages today and every quoted line in `PLAN.md:85-108` matches the live text verbatim, so the substance is sound. - ---- - -## Summary - -The fix itself is correct, minimal, well-argued against the fetched spec, and genuinely demonstrated red-before-green by mutation. Shape (A) is the right shape and I reach that independently. State threading is right in both new branches; no silent behaviour change is undisclosed. The gate is green on every line. - -One blocking item: the `@moduledoc` at `lib/beam_mcp/server.ex:16-18` — the module's published documentation — still states the pre-fix rule this diff deletes. That is a two-line edit in a file already in scope, and it is the same doc/code mismatch the slice was written to close. - -VERDICT: changes required diff --git a/slices/001b-ping-guard/logs/round1.r2.md b/slices/001b-ping-guard/logs/round1.r2.md deleted file mode 100644 index d930bd1f..00000000 --- a/slices/001b-ping-guard/logs/round1.r2.md +++ /dev/null @@ -1,199 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 1, security, contract and evidence integrity -Type: Report - -**Tree read:** `a42f1b1e82599b203df0afcaaa8639203fd663d7` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review && git write-tree -a42f1b1e82599b203df0afcaaa8639203fd663d7 -``` -Written to `/home/aylac/Projects/beam_mcp-wt/001b-review/logs-r2.tree`. No file under review was modified; all probes ran either in this throwaway checkout or in a copy at `/r2/before/` built with `tar` + `git show base/main:…` (no `.git`, own `_build`). - ---- - -## Answer to the security question first, because it is clean - -**The change does not widen the attack surface.** `tools/call` was *already* reachable through `_meta` naming `2025-11-25` at `base/main`, because the old `cond` at `lib/beam_mcp/server.ex:124` (base) tested `version not in @supported_versions`, and `2025-11-25` **is** in `@supported_versions` (`server.ex:42`). Only `ping` took the refusal branch; everything else fell to `true ->` and was served. So the new `@legacy_version` branch at `server.ex:142-145` adds exactly one newly-reachable method — `ping`, which returns `result(id, %{})` at `server.ex:156-158` and touches no state, no catalog and no dispatch. - -Both branches converge on the same call: `handle_message(state, bare)` (`server.ex:138` modern, `server.ex:145` legacy) → the `tools/call` clause at `server.ex:165-192` → `validate_and_dispatch/3` at `server.ex:282-292` → `Schema.validate/2` before `state.dispatch.(…)`. Validation is not merely "still applied" — it is the *same* code path with no version-dependent branch anywhere between the era switch and the dispatch call. Demonstrated, identical rejections on both branches and at both refs: - -``` -$ mix run /r2/probe_r2.exs # in the review checkout, 0.1.2 -tools/call legacy _meta, INVALID args (missing required) - -> {"id":4,...,"result":{"content":[{"text":"strict_echo: invalid arguments: missing required property: text",...}],"isError":true,...}} -tools/call modern _meta, INVALID args (missing required) - -> {"id":4,...,"result":{"_meta":{...},"content":[{"text":"strict_echo: invalid arguments: missing required property: text",...}],"isError":true,"resultType":"complete",...}} -tools/call legacy _meta, INVALID args (additionalProperties) - -> ... "invalid arguments: unknown property: x" ... "isError":true -tools/call modern _meta, INVALID args (additionalProperties) - -> ... "invalid arguments: unknown property: x" ... "isError":true -tools/call UNSUPPORTED version -- does dispatch run? - -> {"error":{"code":-32022,...}} # dispatch not reached -``` -The same script against the `base/main` copy returns the byte-identical bodies for every `tools/call` case (only the added `resultType`/`_meta` decoration differs). Dispatch is unreachable on the `_other` branch (`server.ex:147-148`) — the `-32022` is returned *before* any recursion. - -Enumeration of the legacy branch, measured, `mix run /r2/probe_r2.exs` section D: - -| method | through legacy `_meta` | reached via | -|---|---|---| -| `server/discover` | result | `server.ex:92` (clause precedes `_meta`) | -| `initialize` | result, sets `initialized?` | `server.ex:102` (clause precedes `_meta`) | -| `notifications/initialized` | `nil` | `server.ex:152` | -| `ping` | `{"result":{}}` | `server.ex:156` — **the only new reachability** | -| `tools/list` | result | `server.ex:160` | -| `tools/call` | dispatch, schema-validated | `server.ex:165` — reachable before, unchanged | -| `shutdown` | sets `shutdown?` | `server.ex:194` — reachable before | -| `exit` | `nil`, sets `shutdown?` | `server.ex:198` — reachable before | -| unknown | `-32601` | `server.ex:202` | - -No recursion hazard: `bare = Map.drop(message, ["_meta"])` at `server.ex:129` removes the only key that can re-match the clause head, so the recursive call at `:138`/`:145` cannot re-enter. A nested `_meta` under `params` does not re-enter either (measured, section E). - -**Untrusted input: every value is handled, nothing crashes, no atom growth.** `mix run /r2/probe_r2.exs`, sections A/B/F/G: - -``` -version = 42 / null / true / ["2025-11-25"] / {"v":"…"} / "" / " 2025-11-25" - -> all: {"error":{"code":-32022,"data":{"requested":,"supported":[...]},...}} -_meta = "2025-11-25" | [] | 7 | null | {} (method ping) - -> all: {"id":1,"jsonrpc":"2.0","result":{}} (clause head does not match; falls through) -atom_count before=24154 after=24154 delta=0 # 20 000 distinct unknown version strings -atom_count before=24154 after=24154 delta=0 # 20 000 distinct undeclared tools/call argument keys -``` -No `FunctionClauseError`, no raise, no throw, on any of the 30 shapes probed (the probe wraps every call in `rescue`/`catch` and would have printed `RAISED`/`THREW`). `case version do` at `server.ex:131` has a total `_other` fallback, and `String.to_atom/1` at `server.ex:318` is fed only from schema-declared property keys, never from the wire. - ---- - -## Findings - -### 1. `logs/probe-after.txt` is not an archive of the tree under review — non-blocking - -`slices/001b-ping-guard/logs/probe-after.txt:3` and `:16`; `mix.exs:7`. - -**Observed** — the file offered as the *after* measurement reports `beam_mcp version: 0.1.1`, and the modern `tools/list` result it archives embeds `"io.modelcontextprotocol/serverInfo":{"name":"beam_mcp","version":"0.1.1"}`. The reviewed index has `mix.exs:7` `@version "0.1.2"`, and `@server_version` at `server.ex:49` is compiled from exactly that value. - -**Expected** — an *after* archive shows the state being shipped. Re-running the same probe on the index: - -``` -$ mix run /r2/probe_ping_repro.exs # review checkout -beam_mcp version: 0.1.2 -ping + _meta 2026-07-28 -> {"error":{"code":-32601,...}} -ping + _meta 2025-11-25 -> {"id":1,"jsonrpc":"2.0","result":{}} -ping + _meta, no version key -> {"id":1,"jsonrpc":"2.0","result":{}} -ping bare -> {"id":1,"jsonrpc":"2.0","result":{}} -tools/list + _meta 2025-11-25 -> {"id":2,...,"result":{"tools":[...]}} -tools/list + _meta 2026-07-28 -> {...,"serverInfo":{"name":"beam_mcp","version":"0.1.2"},...} -``` -Every protocol-relevant byte matches the archive; the two version strings do not. So the archive was captured after the `lib/` edit and **before** the `mix.exs` bump, and it is the only record in the slice of what the modern envelope emits — which is precisely the field the bump changes. `FINDINGS.md:9-11` claims each log "was written by the command that produced it", which is true of the bytes; `FINDINGS.md:76` then lists it under **Green** with no note that the tree it measured is not the tree being committed. Re-take it, or annotate line 76 with the version it was taken at. - -### 2. `README.md:96` states an envelope invariant the server does not keep — non-blocking - -`README.md:96` (new line) vs `lib/beam_mcp/server.ex:89-99` and `:344-345`. - -**Observed** — the new table row reads `| result envelope | resultType and _meta serverInfo | neither; … |`, and `README.md:98` says `server/discover` is served "at both eras". The `server/discover` clause at `server.ex:92` precedes the `_meta` clause, so its result is never passed through `modernise/2`: - -``` -$ mix run /r2/probe_envelope.exs -modern _meta + server/discover - -> {"id":1,"jsonrpc":"2.0","result":{"capabilities":{...},"protocolVersions":[...],"serverInfo":{...}}} -modern _meta + shutdown - -> {"id":1,...,"result":{"_meta":{"io.modelcontextprotocol/serverInfo":{...}},"resultType":"complete"}} -``` -**Expected** — either the row carries the `server/discover` exception, or the gap joins the `ttlMs`/`cacheScope` entry in `FINDINGS.md:118-123` ("Recorded, not fixed"). As it stands the package's own comment at `server.ex:344` ("2026-07-28 requires `resultType` on every result") and its README assert an invariant a one-command probe falsifies on a **mandatory** method. Pre-existing in `lib/`; the *claim* is new in this diff, which is what makes it in scope. - -### 3. A wire-visible field removal ships under `### Fixed` with no `### Changed` and no breaking marker — non-blocking, but decide it deliberately - -`CHANGELOG.md:12-40`, `mix.exs:7`. - -**Observed** — `grep -nic 'breaking' CHANGELOG.md` → `1`, and that one occurrence is in the `0.1.0` section (line 156, "without a breaking change"). `grep -n '^### ' CHANGELOG.md` shows the `0.1.2` section has `### Fixed` and `### Note on 0.1.1` only. - -**Both sides, as asked.** - -*For `0.1.2`.* Semver §4 puts `0.y.z` outside the compatibility contract entirely. The behaviour removed was never advertised: `server/discover` returns `["2026-07-28","2025-11-25"]` (`server.ex:95`), the `-32022` payload lists `2025-11-25` as supported (`server.ex:339`), and the spec's retry advice generates the very message that was being refused — so a consumer depending on `ping + _meta 2025-11-25` → `-32601` was depending on the server contradicting its own advertisement. `0.1.1` was never published, so the only released baseline is `0.1.0` and this is the first patch over it. - -*Against.* For a published Hex package the JSON on the wire **is** the API, and this removes two fields from results for an input that previously produced them — not only for `ping`. Measured, same request, two refs: - -``` -base/main : tools/list + _meta 2025-11-25 -> {"result":{"_meta":{"io.modelcontextprotocol/serverInfo":{...}},"resultType":"complete","tools":[...]}} -index : tools/list + _meta 2025-11-25 -> {"result":{"tools":[...]}} -``` -A `0.1.0` client that sends legacy `_meta` and reads `result.resultType` gets `nil` after upgrading a *patch*. In the Elixir/Hex convention where `0.MINOR` carries the breaking axis, `0.2.0` is the honest signal. At minimum the entry needs a `### Changed` sub-head or one sentence saying two fields are removed from legacy-declared results — the after-block at `CHANGELOG.md:29-32` shows it, but a reader scanning `Fixed` will not read it as a removal. I do not insist on `0.2.0`; I do insist the removal is labelled. - -### 4. `README.md:94` — "session … yes" is not enforced anywhere — note - -`grep -rn 'initialized?' lib/` returns four hits: the type at `server.ex:60`, the initialiser at `:71`, and two **writes** at `:113` and `:153`. There is no read. A bare `tools/call` with no `initialize` dispatches: - -``` -tools/call bare, VALID args -> {"id":3,...,"result":{...,"dispatched":"strict_echo"},"isError":false} -``` -The `yes` in that cell is pre-existing; this diff amends the cell (`, unless declared through _meta`), which is a good moment to say the session is tracked and not enforced. - -### 5. `server.ex:119` — the new comment overstates the clause's reach — note - -The comment says "A request carrying per-request `_meta` is served statelessly … whatever revision it names." Measured, a `_meta` that is not a map (`"2025-11-25"`, `[]`, `7`, `null`) or that is a map without the version key does **not** match the clause head at `:127` and is served by the fall-through handlers instead — `ping` under such a `_meta` is answered. `FINDINGS.md:37-39` records the missing-key boundary; the non-map boundary is unrecorded and the comment reads as if the clause covered both. Unchanged from `base/main`; only the comment is new. - -### 6. `PLAN.md:12-15` — a fetch dated one day in the future, and the fetch has no archive — note - -``` -$ date -I -2026-09-06 -$ sed -n '12,15p' slices/001b-ping-guard/PLAN.md -**Every specification claim below was fetched on 2026-09-07 from …** -``` -The date cannot have happened. Separately, the blockquotes at `PLAN.md:87-108` are the load-bearing evidence for the entire design decision, and no `logs/` file archives the fetch. `CONVENTIONS.md:77-79` permits citation-with-URL as always honest, so the *form* is allowed — but "fetched … not recalled" is an unverifiable process assertion, and `curl … | tee logs/spec-versioning.txt` would make it checkable at no cost. I could not verify the quotes independently. - -### 7. `FINDINGS.md:84` cites a line number that is stale in the tree it ships with — note - -It reads: the pre-existing test `(negotiation_test.exs:145)` was not edited. At `base/main` that was correct. In the reviewed index the diff inserts 15 lines above it, so the test is at `test/beam_mcp/negotiation_test.exs:160`, and line 145 is now `"1900-01-01"` inside the `-32022` test. The claim itself is true — I verified the test body is byte-identical across the diff — but a reader following the citation in the merged tree lands on a different test. Acceptance criterion 2 in `PLAN.md:170` has the same number; that one is defensible, since the PLAN was written pre-edit. - -### 8. REUSE population: `.txt` is correctly outside, `.md` is an accidental gap — note - -`tools/gate.sh:30` derives its population as `git ls-files -- '*.ex' '*.exs' '*.sh' '*.yml'`. The five new `logs/*.txt` files are **outside** it, and that is **correct**: an SPDX header prepended to a `tee`d archive would break `CONVENTIONS.md:73-79` — the bytes would stop being the command's bytes. The two rules are consistent. - -The gap is `.md`. Six tracked `.md` files carry SPDX headers by convention, two do not (`FINDINGS.md`, `PLAN.md` at the repo root), and the gate cannot see either fact. This diff does not add a violation — `slices/001b-ping-guard/PLAN.md:1-4` and `FINDINGS.md:1-4` both carry headers — but the population is a hand-written extension glob under a comment that says "every tracked file that can carry a comment", which is the shape `CONVENTIONS.md:20-37` warns about. Out of scope here; worth filing. - -Also at `tools/gate.sh:43`: `[ "$fail" -eq 0 ] && note "licence files" "pass"` — if any earlier step failed, the `licence files` line is **not printed at all**, so a reader following "read the step's line, not the exit code" gets a silently absent verdict rather than a failure. Not in this diff. - -### 9. `-32022` echoes arbitrary attacker-supplied JSON — note, unchanged from base - -`server.ex:339` puts `requested => version` verbatim into the error payload, and section A shows maps, lists and booleans echoed back. Reflection is to the same client only and the amplification is ~1×, so I am not calling it a defect; recording it because the new `_other` branch is where it now lives, and because a future change that logs or forwards that payload would inherit it. Byte-identical behaviour at `base/main`. - ---- - -## Reproductions I ran (evidence integrity, item 5) - -| archived log | my re-run | result | -|---|---|---| -| `logs/gate.txt` | `./tools/gate.sh` | **byte-identical**, all six lines `pass`, `exit=0` | -| `logs/green-negotiation.txt` | `mix test test/beam_mcp/negotiation_test.exs` | `12 tests, 0 failures`, `exit=0` (archive's extra `Compiling`/`Generated` lines are first-run noise) | -| `logs/full-suite.txt` | `mix test` | `36 tests, 0 failures`, `exit=0` | -| `logs/red.txt` | same test file against a `base/main` copy of `lib/beam_mcp/server.ex` in `/r2/before/` | **reproduced**: `12 tests, 0 failures` → `12 tests, 2 failures`, `exit=2`, same two tests (`:167`, `:186`), same messages | -| `logs/probe-after.txt` | `mix run /r2/probe_ping_repro.exs` | protocol bytes identical; version string `0.1.1` vs `0.1.2` — **finding 1** | - -The `base/main` "before" measurement in `FINDINGS.md:25-32` and `:47-49`, `PLAN.md:30-37` and `:72-74`, and `CHANGELOG.md:23-26` all reproduce exactly against the copy, including `"version":"0.1.1"` in the modernised legacy result. `CHANGELOG.md:29-32`'s after-block reproduces exactly against the index. - -The claim "Live in published `0.1.0`" (`FINDINGS.md:17`, `CHANGELOG.md:34`) is cited only to `5d8d1ae`, which is `main`, not the release. I checked the tag myself: `git show v0.1.0:lib/beam_mcp/server.ex` carries the same version-blind `cond` at its lines 98-108, and `git show v0.1.0:mix.exs` reads `@version "0.1.0"`. The claim is **true and under-cited** — no fetch of the Hex artifact backs it, only the tag, which I verified. - ---- - -## What is not wrong - -The `lib/` change is correct, minimal, and I found nothing to fix in it. The era switch is total, the two branches share one validation path, dispatch is unreachable before version acceptance, the recursion terminates by construction, and thirty malformed shapes produce no crash and no atom growth. Acceptance criteria 1-5 in `PLAN.md:167-174` are all met and I reproduced each. I am not raising a `lib/` finding, and I am not inventing one. - -The three items I want changed are a stale evidence archive (1), a README claim contradicted by a one-command probe (2), and an unlabelled wire-visible removal in the changelog (3). All three are text, none touches `lib/`, and none requires a re-run of the test evidence. - -**VERDICT: changes required** diff --git a/slices/001b-ping-guard/logs/round2.r1.md b/slices/001b-ping-guard/logs/round2.r1.md deleted file mode 100644 index 09dc09f5..00000000 --- a/slices/001b-ping-guard/logs/round2.r1.md +++ /dev/null @@ -1,273 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 2, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review2 && git write-tree -867f28cecbf790f17e7a43747c74cbc3c5990033 -``` - -Matches the hash you named. Written to `001b-review2/logs-r1.tree`. `git status --short` shows -only that untracked file, so the index did not move under me. I re-reviewed the whole tree, not -only the delta. - ---- - -## Part 1 — the round-1 findings, re-checked against the bytes - -### 2.1 (was BLOCKING) — moduledoc. **Closed.** The moduledoc now matches the code - -`lib/beam_mcp/server.ex:16-27`. The false clause is gone, and the replacement makes two -positive claims that I verified rather than read: - -| moduledoc claim | probe | observed | -|---|---|---| -| "the revision it *names* then decides the method table and the result envelope" | `ping`/`tools/list` at each `_meta` | matches; `probe-after.txt` reproduces | -| "`server/discover` … `initialize` … Neither result is decorated" | E, F below | neither carries `resultType` or `_meta` | -| "served identically at both eras" | E vs. legacy `_meta` | same bytes at both | - -``` -E. server/discover + _meta modern - -> {"id":1,"jsonrpc":"2.0","result":{"capabilities":{...},"protocolVersions":["2026-07-28","2025-11-25"],"serverInfo":{...}}} -F. initialize + _meta modern - -> {"id":1,"jsonrpc":"2.0","result":{"capabilities":{...},"protocolVersion":"2026-07-28","serverInfo":{...}}} - shutdown?=false initialized?=true -``` - -The new comment at `server.ex:126-128` also makes a new falsifiable claim — "A `_meta` that is -not a map, or that carries no version key, does not match this head at all and falls through" — -so I falsified it rather than accepting it. Four inputs, all fall through correctly: - -``` -A. _meta is a STRING, method ping -> {"id":1,"jsonrpc":"2.0","result":{}} -B. _meta is a LIST, method ping -> {"id":1,"jsonrpc":"2.0","result":{}} -C. _meta map, NO version key, ping -> {"id":1,"jsonrpc":"2.0","result":{}} -D. _meta is a STRING, tools/list -> {"result":{"tools":[...]}} # undecorated, as the bare handler -``` - -### 4 — coverage. **Closed, and the mutation reproduces independently** - -You asked me to score your mutation myself rather than take it. I did, in a fresh directory -created and verified empty (`0 entries`), populated by `git archive HEAD | tar -x` from the -round-2 index, `deps/` and `_build/` copied, `git init`. Match count asserted before and after, -`mix compile --force` before scoring: - -``` -MUTATION A match count BEFORE = 1 -MUTATION A old remaining = 0 new present = 1 -MUTATION A applied. -157c157 -< handle_message(state, bare) ---- -> {state, handle_message(state, bare) |> elem(1)} - - 1) test state threads through both era branches shutdown declaring 2025-11-25 through _meta still sets shutdown? - test/beam_mcp/negotiation_test.exs:184 -15 tests, 1 failure -exit=2 -``` - -Identical to your record — `15 tests, 1 failure`, same test, same line. Control on the -unmutated copy: `39 tests, 0 failures`. - -I then ran a **second** mutation you did not, to score the other new test — the `next`-vs-`state` -fix from round-1 note 2.3, which is the mutation that test exists to catch: - -``` -MUTATION B match count BEFORE = 1 # {next, modernise(response, next)} -> {state, modernise(response, next)} -MUTATION B old remaining = 0 new present = 1 -151c151 -< {next, modernise(response, next)} ---- -> {state, modernise(response, next)} - - 1) ... test/beam_mcp/negotiation_test.exs:191 -15 tests, 1 failure -exit=2 -``` - -So two of the three new tests are demonstrably scored. See round-2 finding 1 for the third. - -### 2.3 (note) — `modernise(response, next)`. **Closed**, and now covered by mutation B above. - -### 1c — changelog item 8. **Closed, and the correction is accurate.** `FINDINGS.md:51-65` now -says the MUST is client-directed and governs omission, quotes `2025-11-25`'s "**MAY** follow any -JSON object structure", and states the fix wins on honesty rather than conformance. That is what -I found and it is stated without softening the conclusion, which is the right outcome: (A) is -still the right shape. - -### 2.2 — README counterexamples. **Closed.** `README.md:108-114` names both exceptions -explicitly, says a `server/discover` result carries no `resultType` "even under `2026-07-28`, -where the specification requires one on every result", and calls it "a known gap, not a design -choice". It is also filed as item 3 under "Recorded in round 2, not fixed". Both halves verified -at probes E and F. - -### 6.1 — the three wrong counts. **Closed, and the new counts are right.** I re-derived every -one rather than reading the correction: - -``` -$ git show base/main:test/…/negotiation_test.exs | grep -c '^\s*test ' 9 # "nine pre-existing" -$ grep -c '^\s*test ' test/beam_mcp/negotiation_test.exs 15 # "a file total of 15" -$ mix test test/beam_mcp/negotiation_test.exs 15 tests, 0 failures -$ mix test 39 tests, 0 failures -scripted-edit table data rows 6 # "Six edits" -$ grep -rn 'initialized?' lib/ 4 hits: type, initialiser, 2 writes, no read -$ git diff base/main HEAD -- test/ | grep -c '^-[^-]' 0 # "no `-` line" -``` - -All six correct. The decision to cite the unmodified test **by name** rather than by line -(`FINDINGS.md:111-115`) is the right fix for the failure mode it describes. - -### 6.3 — `probe-after.txt` at `0.1.1`. **Closed.** Re-taken; it now reads `beam_mcp version: -0.1.2` and its modern `serverInfo` carries `0.1.2`. `full-suite.txt` (39/0) and -`green-negotiation.txt` (15/0) re-taken with it, and both reproduce against my own runs. - -### 6.4 — fetch date and archives. **Closed, and the archives are real.** Date now `2026-09-06`. -Both `logs/spec-*.md` carry the site's `> ## Documentation Index` preamble and `theme={null}` -fence attributes — artefacts of a fetch, not of typing — and every passage the PLAN quotes is -present. I checked each quote by `grep -F`, and chased the two that returned `0` rather than -reporting them as absent: both are present and merely hard-wrapped at the source. - -``` -50:If the server does not implement the requested version (whether the version -51-is unknown to the server, or is a known version the server has chosen not to -52-support), it **MUST** respond with an -176:A dual-era **server** selects its behavior from how the client opens: -178-* A request carrying modern per-request `_meta` is served statelessly -179- according to this revision. -``` - -I also cross-checked four distinctive strings from **my own** live fetch on 2026-09-06 against -each archive (terminology block, compatibility matrix, stdio probe sentence; changelog items 5, -8, 12 and the `ttlMs`/`cacheScope` item) — all present. The archives are the pages I read. - ---- - -## Part 2 — new findings on the round-2 tree - -### Finding 1 — non-blocking. "Three tests … scored by mutation" over-claims: one mutation, one killed test - -`slices/001b-ping-guard/FINDINGS.md`, "Coverage — r1 finding 4": "Three tests added, and -**scored by mutation** rather than assumed", followed by exactly one mutation. - -**Observed:** that mutation kills exactly one of the three (`:184`, the legacy `shutdown`). My -mutation B kills the second (`:191`, the modern `shutdown`). The third — `a ping at either -revision leaves the state alone` — is killed by neither, and I could construct no mutation of -the code under review that kills it: nothing on the `ping` path touches `shutdown?`, so it is an -unscored guard against a future regression, not a scored test. - -**Expected:** the record says what was measured. This is the same class the slice keeps -correcting — `CONVENTIONS.md:20-37` is a whole section on a probe that proves nothing quietly, -and round 1's finding 6.1 was three counts asserted past the evidence. One sentence fixes it: -one mutation was run and kills one of the three; r1 ran a second that kills the second; the -third is an unscored guard. Mutation B's output above is yours to quote — I am the source of -those bytes and this file is archived beside FINDINGS. - -### Finding 2 — non-blocking. The round-2 mutation has no archived log, unlike round 1's red - -Round 1's red is archived at `logs/red.txt`, written by the command. The round-2 mutation -appears only as an indented block inside `FINDINGS.md`, and `ls logs/` shows no -`mutation*.txt`. It is not *labelled* an archive, so `CONVENTIONS.md:73-79` is not breached — -but it is the one measurement in this slice that a reader cannot check against bytes, and it is -the measurement that licenses the coverage claim. `logs/round2.r1.md` (this file) now carries an -independent reproduction, which closes it in practice; a `tee`d log would close it in form. - -### Finding 3 — note. `gate.txt` was not re-taken for round 2 - -`logs/probe-after.txt`, `full-suite.txt` and `green-negotiation.txt` were re-taken against the -final tree; `gate.txt` was not (unchanged in the delta). Its bytes happen to be correct — I ran -the gate on the round-2 index and got byte-identical output, `17 commentable files` included — -so nothing is misstated. Recorded only because "re-taken against the final tree" is now true of -three of the four run-logs and not the fourth. - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review2 && ./tools/gate.sh; echo "gate exit=$?" -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - reuse pass (17 commentable files) - licence files pass -Gate OK. -gate exit=0 -``` - -Read per step: all six lines read `pass`, no step printed `pass` beside a `FAIL` elsewhere. -Acceptance criterion 5 met. My untracked `logs-r1.tree` is invisible to the `reuse` step, which -derives its population from `git ls-files`, so it cannot have skewed the count. - -### Finding 4 — note. The two new spec archives widen the gap FINDINGS item 6 describes - -Item 6 says "`.md` is outside it, and **two** tracked root `.md` files carry no SPDX header". -Still literally true — the two are `FINDINGS.md` and `PLAN.md` at the repo root — but round 2 -added two more headerless tracked `.md` files: - -``` -$ git ls-files -- '*.md' | while read f; do head -5 "$f" | grep -q SPDX-License-Identifier || echo "NO-SPDX: $f"; done -NO-SPDX: FINDINGS.md -NO-SPDX: PLAN.md -NO-SPDX: slices/001b-ping-guard/logs/spec-basic-versioning.md -NO-SPDX: slices/001b-ping-guard/logs/spec-changelog.md -``` - -And the rationale item 6 already gives for `.txt` — "an SPDX header prepended to a `tee`d -archive would stop the bytes being the command's bytes" — applies to these two *exactly*, since -they are `curl -o` output. That is the strongest argument in the item and it is not attached to -the files it most obviously covers. Worth one clause. - -### Finding 5 — note. `0.1.0` and `0.1.1` label the same measured behaviour in adjacent blocks - -`CHANGELOG.md:18` ("In `0.1.0` it carried both") and `CHANGELOG.md:45` ("Measured against -`0.1.1`") describe the same before-state under two version numbers. **Both are correct** — I -checked rather than assumed: - -``` -$ git show v0.1.0:lib/beam_mcp/server.ex | sed -n '/A request carrying modern per-request/,/^ end/p' - # byte-identical `cond` to base/main: version-blind ping guard, unconditional modernise -$ git show v0.1.0:mix.exs | grep '@version' - @version "0.1.0" -``` - -The "Note on `0.1.1`" explains why both numbers appear. Recorded as a readability nit only. - -### Not findings — claims I tried to break and could not - -- **`### Changed` is accurate and is the right call.** `0.1.0` did emit both fields on that - path (verified above), the removal is real, and naming it a removal while flagging `0.2.0` as - the arguably honest number — and leaving the choice to the owner — is a better record than - silently shipping it under `### Fixed`. -- **"The session is tracked, not enforced"** (`README.md:116-121`). Verified two ways: `grep` - finds no read of `initialized?`, and a bare `tools/call` with no `initialize` dispatches: - `-> {"result":{"content":[…],"isError":false,"structuredContent":{}}}`. Stating it in the - README rather than leaving it tribal is the right resolution. -- **FINDINGS item 5, the `-32022` echo.** Spot-checked with a nested map, a list, a boolean and - an integer: all echoed verbatim in `data.requested`, none crash, reflection is to the same - caller at ~1x. Correctly classified as recorded-not-defect, and correctly noted as - byte-identical at `base/main` (`diff` on `unsupported_version/2`: IDENTICAL). -- **FINDINGS item 7, the `licence files` line.** `tools/gate.sh` ends with - `[ "$fail" -eq 0 ] && note "licence files" "pass"`, so with an earlier failure the line is - absent rather than failing. Accurately described. -- **Quotes of my round-1 report** in the round-2 FINDINGS section are accurate; the archived - original is at `logs/round1.r1.md`, written by me. - ---- - -## Summary - -Every round-1 finding is closed, and closed on the bytes rather than on the description. The -blocking one — the moduledoc — is genuinely fixed, and the replacement text makes three new -falsifiable claims, all of which I falsified and all of which hold. The new tests are real: I -reproduced your mutation independently and ran a second one you did not, which scores the other -`shutdown` test. The corrected counts are all re-derived and all right. The spec archives are -real fetches and contain every passage the PLAN quotes. - -Five items remain, none blocking, four of them one-sentence record fixes. The one I would -actually change before merge is finding 1 — "three tests scored by mutation" over one mutant is -the same overstatement class this slice has now corrected twice, and this report supplies the -missing second mutant so the fix costs nothing. - -VERDICT: approve diff --git a/slices/001b-ping-guard/logs/round2.r2.md b/slices/001b-ping-guard/logs/round2.r2.md deleted file mode 100644 index bb190e87..00000000 --- a/slices/001b-ping-guard/logs/round2.r2.md +++ /dev/null @@ -1,201 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 2, security, contract and evidence integrity -Type: Report - -**Tree read:** `867f28cecbf790f17e7a43747c74cbc3c5990033` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review2 && git write-tree -867f28cecbf790f17e7a43747c74cbc3c5990033 -``` -Written to `/home/aylac/Projects/beam_mcp-wt/001b-review2/logs-r2.tree`. Matches the hash you named. I re-reviewed the whole tree, not only the delta. - ---- - -## Security, re-checked on the round-2 tree: unchanged and still clean - -The round-2 `lib/` delta is a moduledoc rewrite, a clause comment, and one argument swap. I re-ran the full 30-shape adversarial probe from round 1 against this tree and diffed it against the round-1 output: - -``` -$ mix run /r2/probe_r2.exs > probe_r2_round2.out # in 001b-review2 -$ diff probe_r2.out probe_r2_round2.out -ROUND2 BEHAVIOUR IDENTICAL TO ROUND1 -``` -Byte-identical across every case: non-string `version` (integer, `null`, `true`, list, map, empty string, leading space), non-map `_meta` (string, list, integer, `null`, `{}`), `tools/call` on both era branches with valid, missing-required and additionalProperties-violating arguments, every method through the legacy branch, and both atom-growth loops (`delta=0` on 20 000 distinct unknown versions and 20 000 undeclared argument keys). No crash, no unmatched clause. My round-1 conclusion stands: the surface is not widened, `tools/call` was already reachable through legacy `_meta` at `base/main`, and both branches share one validation path. - ---- - -## Findings - -### 1. The two re-taken test archives are filtered — the first line the command emits was removed — **blocking** - -`slices/001b-ping-guard/logs/full-suite.txt:1`, `slices/001b-ping-guard/logs/green-negotiation.txt:1`. - -**Observed** — `mix test` unconditionally prints `Running ExUnit with seed: N, max_cases: M` as its first line. Both re-taken archives begin with a blank line instead: - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review2 && mix test > full2.out 2>&1 ; head -4 full2.out | cat -A -Running ExUnit with seed: 509350, max_cases: 64$ -$ -.......................................$ -Finished in 1.0 seconds (0.04s async, 0.9s sync)$ - -$ cat -A slices/001b-ping-guard/logs/full-suite.txt -$ -.......................................$ -Finished in 1.0 seconds (0.05s async, 0.9s sync)$ -39 tests, 0 failures$ - -$ diff full2.out slices/001b-ping-guard/logs/full-suite.txt -1d0 -< Running ExUnit with seed: 509350, max_cases: 64 -``` -Same for `green-negotiation.txt` (`1d0`, same line). I ruled out a configuration explanation rather than assuming one: - -``` -$ mix test --seed 0 2>&1 | head -2 -Running ExUnit with seed: 0, max_cases: 64 - -$ cat test/test_helper.exs -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 - -ExUnit.start() -``` -Nothing in this tree suppresses that line. The round-1 versions of both files **contained** it (`green-negotiation.txt` also carried `Compiling 1 file (.ex)` / `Generated beam_mcp app`); the round-2 versions do not. So bytes were removed after capture — a `tail -n +2`, a `grep -v`, or an equivalent. - -**Expected** — `CONVENTIONS.md:73-79`: "Either a command reads the source and writes the file — so the bytes are the source's bytes — or the file is not an archive and is not labelled one." `FINDINGS.md:9-11` labels every file under `logs/` an archive written by the command that produced it. These two are not. - -I am calling this blocking, and I want to be precise about why, because the *counts* in both files are correct — I reproduced `39 tests, 0 failures` and `15 tests, 0 failures` exactly. The defect is not a wrong number. It is that the fix for r2 finding 1 — a finding about an archive that did not describe the tree it shipped with — was implemented by producing two archives that are no longer verbatim. That is the rule the re-take existed to satisfy, broken in the act of satisfying it, and `CONVENTIONS.md:91-93` is explicit that this family is the worst one because a filtered archive is indistinguishable from evidence. If the seed line was stripped for reproducibility, that is a defensible goal reached the one way this project forbids; re-take with the raw bytes, and if the seed's variability is the problem, say so in prose beside the file. - -### 2. `FINDINGS.md`'s Green block quotes counts the archives it cites contradict — non-blocking - -`slices/001b-ping-guard/FINDINGS.md:96-101`. - -**Observed** — the block reads: - -``` - $ mix test test/beam_mcp/negotiation_test.exs - 12 tests, 0 failures - exit=0 # logs/green-negotiation.txt - - $ mix test - 36 tests, 0 failures # logs/full-suite.txt -``` -The cited files now read `15 tests, 0 failures` and `39 tests, 0 failures`. `FINDINGS.md:92`, four lines above, already says "Round 2 added three more tests … for a file total of 15", so the file contradicts itself within one screen. - -**Expected** — `CONVENTIONS.md:70`: "Counts are quoted from command output, never typed fresh." Round 2 re-took the archives and left the quotations behind. This is the same defect r1 caught as finding 6.1 (the "four edits" sentence over a six-row table), recurring in the same file. - -### 3. An undisclosed `lib/` change in round 2, and no test can catch it — non-blocking - -`lib/beam_mcp/server.ex:151`, `slices/001b-ping-guard/FINDINGS.md:168-175`. - -**Observed** — round 2 changes `{next, modernise(response, state)}` to `{next, modernise(response, next)}`. `FINDINGS.md`'s round-2 section describes exactly one `lib/` change ("Blocking — one, from r1 … the `@moduledoc`"); `grep -n 'modernise' FINDINGS.md` returns only two hits, both pre-existing round-1 text. Neither lane asked for this. - -I scored it. Mutant M3 reverts it, applied through an asserting mutator (`before=1 old_after=0 new_after=1`), recompiled with `mix compile --force` before scoring: - -``` -########## MUTANT: M3 modernise reads pre-recursion state (the round-2 lib change, reverted) -applied: before=1 old_after=0 new_after=1 -15 tests, 0 failures -REAL_EXIT=0 -``` -**The mutant survives the entire suite.** The change is unfalsifiable today — which the code comment at `server.ex:148-150` states plainly and correctly ("currently indistinguishable"). I am not asking for it to be reverted; defensive correctness ahead of a latent trap is reasonable and the comment is honest. I am asking that a `lib/` edit no record mentions gets one line in FINDINGS, because "every change below is documentation, evidence, or coverage" (`FINDINGS.md:166`) is now false of the tree it introduces. - -### 4. "Three tests … scored by mutation" is evidenced for one, true for two, and not achievable for the third — non-blocking - -`slices/001b-ping-guard/FINDINGS.md:181-193`. - -**Observed** — the sentence reads "Three tests added, and **scored by mutation** rather than assumed", followed by a single mutant. I reproduced that one and scored the other two myself, same asserting mutator, same recompile-before-scoring discipline: - -``` -########## MUTANT: M1 legacy branch returns pre-recursion state -applied: before=1 old_after=0 new_after=1 - 1) test ... shutdown declaring 2025-11-25 through _meta still sets shutdown? - test/beam_mcp/negotiation_test.exs:184 -15 tests, 1 failure -REAL_EXIT=2 - -########## MUTANT: M2 modern branch returns pre-recursion state -applied: before=1 old_after=0 new_after=1 - 1) ... test/beam_mcp/negotiation_test.exs:191 -15 tests, 1 failure -REAL_EXIT=2 -``` -M1 reproduces your recorded score exactly, down to the test name and the failure count. M2 kills the second new test. The third — "a ping at either revision leaves the state alone" (`negotiation_test.exs:194-197`) — has no mutant in this diff's mutation space that kills it: nothing on the `ping` paths writes state, so falsifying it requires inventing a write rather than perturbing an existing one. It is a harmless guard; it is not mutation-scored and cannot be. Say "two of the three are mutation-killed; the third is a guard against a write that does not exist", which is both true and a better sentence. - -### 5. A third specification page is cited but not archived, while the PLAN says both pages are — non-blocking - -`slices/001b-ping-guard/FINDINGS.md:58-60`, `slices/001b-ping-guard/PLAN.md:16-20`. - -**Observed** — round 2 makes a real and welcome correction: item 8's MUST is addressed to clients, so the fix wins on honesty and not conformance. That correction rests on `2025-11-25`'s base-protocol page ("a result **MAY** follow any JSON object structure"). `ls logs/` shows `spec-basic-versioning.md` and `spec-changelog.md` only. `PLAN.md:16` says "**Both pages are archived, by a command that fetched them**" — true of the two it names, and the round-2 correction now leans on a third that is not. - -I verified the quote myself rather than leaving it hanging: - -``` -$ curl -sSL --fail -o legacy-base.md https://modelcontextprotocol.io/specification/2025-11-25/basic.md -$ grep -n 'MAY follow any JSON object structure' legacy-base.md -73:* The `result` **MAY** follow any JSON object structure. -``` -The claim is true. Archive the page, or say in FINDINGS that this one is cited and not archived. - ---- - -## What I verified and found correct - -**The spec archives are genuine.** You asked me not to be the party certifying my own request; I fetched both pages independently and diffed: - -``` -$ curl -sSL --fail -o rf-v.md https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning.md -$ curl -sSL --fail -o rf-c.md https://modelcontextprotocol.io/specification/2026-07-28/changelog.md -$ diff logs/spec-basic-versioning.md rf-v.md && echo IDENTICAL -IDENTICAL -$ diff logs/spec-changelog.md rf-c.md && echo IDENTICAL -IDENTICAL -$ sha256sum logs/spec-basic-versioning.md rf-v.md logs/spec-changelog.md rf-c.md -28c417b3c38345ae8350b9be20ed1b53fcec564b65c13c25d96ab9cfe7e44e9f logs/spec-basic-versioning.md -28c417b3c38345ae8350b9be20ed1b53fcec564b65c13c25d96ab9cfe7e44e9f rf-v.md -203d3c9974e1a0e22308a4f0ae55e6ff7f1ad4150de64411b8c8e03003589aae logs/spec-changelog.md -203d3c9974e1a0e22308a4f0ae55e6ff7f1ad4150de64411b8c8e03003589aae rf-c.md -``` -Every passage `PLAN.md:93-114` quotes is present verbatim, modulo inline-link stripping and marked `[...]` elision, neither of which changes meaning: the `_meta` declaration sentence (`spec-basic-versioning.md:45`), the `MUST respond with an UnsupportedProtocolVersionError` sentence (`:50-55`), the `"supported": ["2026-07-28","2025-11-25"]` example (`:64`), the client retry SHOULD (`:71`), and the dual-era server bullets (`:176-182`). Changelog citations check out too: `resultType` is **Major changes item 8** (`spec-changelog.md:28`) and `ttlMs`/`cacheScope` is **Minor changes item 5** (`:38`), which is exactly how `PLAN.md` and `FINDINGS.md:151` cite them. **This is the strongest evidence in the slice.** Finding 6 from round 1 is closed, and closed better than I asked for. - -**`probe-after.txt` now matches the tree it ships with.** `mix run` of my own reconstruction of the probe, in the round-2 checkout, diffed against the archive with mix compile noise excluded: `IDENTICAL`, including `beam_mcp version: 0.1.2` and the `serverInfo` carrying `0.1.2`. Round-1 finding 1's substance is closed. - -**`gate.txt` is still exact.** `./tools/gate.sh` in the round-2 checkout: `EXIT=0`, and `diff` against the archived file returns `IDENTICAL` — all six steps' own lines read `pass`, `reuse pass (17 commentable files)`. Worth stating explicitly because the tree grew three tests and two tracked `.md` files since round 1 and the REUSE count legitimately did not move: `.md` is outside the glob at `tools/gate.sh:30`. - -**The README's new prose is accurate.** The exceptions paragraph is right — `server/discover` and `initialize` are matched at `server.ex:99` and `:109`, before the era switch, and neither result is decorated: - -``` -modern _meta + server/discover -> {"result":{"capabilities":{...},"protocolVersions":[...],"serverInfo":{...}}} # no resultType -``` -and the archive confirms the "mandatory" framing (`spec-basic-versioning.md:75`, "Servers **MUST** implement `server/discover`"). Calling the missing `resultType` a known gap rather than a design choice is the honest reading. The session paragraph is right too: `grep -rn 'initialized?' lib/` still returns one type, one initialiser, two writes, no read. - -**The CHANGELOG's `### Changed` is correct and correctly scoped.** I checked the "not limited to `ping`" claim on a method the block names, at both refs: - -``` -before (base/main clause): shutdown + _meta 2025-11-25 - -> {"result":{"_meta":{"io.modelcontextprotocol/serverInfo":{...}},"resultType":"complete"}} -round-2 tree: shutdown + _meta 2025-11-25 - -> {"result":{}} -``` -`tools/list` the same, and `tools/call` I measured in round 1. "Requests declaring `2026-07-28`, and requests with no `_meta` at all, are unaffected" is true as written. - -**On whether the labelling is sufficient** — you asked directly. Yes. `### Changed — two fields are REMOVED from results for legacy-declared requests`, placed above `### Fixed`, with the before/after bodies and "a client that reads `result.resultType` on that path gets `nil` after what is numbered a patch release", cannot be scanned as a patch-level fix. Recording the `0.2.0` argument as open for the owner rather than resolving it yourself is the right call and I have no quarrel with it: you have made the number the *least* informative thing in the entry, which was the whole point. - -**Round-1 corrections that landed cleanly:** the PLAN date is `2026-09-06` and matches `date -I`; the pre-existing test is now cited by name with the reason; `FINDINGS.md:84-86`'s derived counts reproduce (`git show base/main:… | grep -c '^\s*test '` → `9`, and `12` was correctly qualified "at the round-1 index"); the clause comment at `server.ex:126-128` now states the non-map and missing-key boundaries, which I measured and confirmed; findings 8 and 9 are recorded as out of scope with the `.txt`-correct / `.md`-gap distinction intact. - ---- - -## Summary - -Nothing in `lib/` is wrong, and nothing about the security posture changed — I re-measured all thirty adversarial shapes and the output is byte-identical to round 1. Four of my five round-1 findings are closed, and the spec-archive fix is verifiably better than what I asked for. What blocks is one thing: the two test archives re-taken to satisfy the verbatim rule had a line removed and no longer satisfy it, and the FINDINGS text still quotes the counts they replaced. Both are minutes of work and neither touches code. - -**VERDICT: changes required** diff --git a/slices/001b-ping-guard/logs/round3.r1.md b/slices/001b-ping-guard/logs/round3.r1.md deleted file mode 100644 index 87782943..00000000 --- a/slices/001b-ping-guard/logs/round3.r1.md +++ /dev/null @@ -1,304 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 3, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review3 && git write-tree -7772c2a8d4bc6feefd96234c696ce4ccb9209d38 -``` - -Matches the hash you named. Written to `001b-review3/logs-r1.tree`. `git status --short` shows -only that file and `logs-r2.tree`. - -**`lib/` and `test/` byte-identical to round 2 — verified, not taken from you.** Whole-subtree -object hashes at both trees: - -``` -$ git ls-tree 867f28ce… lib test / $ git ls-tree 7772c2a8… lib test -040000 tree 13a26a2a1462a424f31fa2f7c04b208d9ad27ceb lib # identical at both -040000 tree a3bacd2b33321c83126ccf20fc31a6990f74a693 test # identical at both -``` - -So both lanes' `lib/` conclusions still stand on bytes they read, and no re-review of the logic -is owed. This round is about the record. - -**I have taken r2's lesson as the method for this round.** My round-2 check on the archives -compared counts and passed over a stripped line; every archive below is checked by `diff` -against bytes I generated myself, and where the source is remote, against my own `curl`. - ---- - -## Finding 1 — **BLOCKING.** `logs/mutation.txt` is filtered, and is labelled as command output - -`slices/001b-ping-guard/logs/mutation.txt`, asserted to be command output in two places: - -- `FINDINGS.md:194`: "both mutations are now archived at `logs/mutation.txt`, **written by the - commands that ran them**" -- `REVIEW.md:124`: "`logs/mutation.txt` added: both mutations, **written by the commands that ran - them**" - -**Observed.** I reproduced mutation A in a directory created empty and verified empty -(`0 entries`), populated by `git archive HEAD` from this index, `deps/`+`_build/` copied, -`git init`; match count asserted before and after; `mix compile --force` before scoring; and the -whole thing captured with a redirect only — no pipe, no filter. Then I diffed the bytes. - -``` -$ diff raw-capture(<) archived-block-A(>) -3d2 -< Compiling 5 files (.ex) -5,8d3 -< Running ExUnit with seed: N, max_cases: 64 -< -< ... -< -10,17d4 -< test/beam_mcp/negotiation_test.exs:184 -< the legacy branch returns the recursion's tuple whole; if it returned the pre-recursion state instead, the transport would never stop -< code: assert Server.shutdown?(send_for_state(legacy_meta("shutdown"))), -< stacktrace: -< test/beam_mcp/negotiation_test.exs:185: (test) -< -< ........... -< Finished in T - -lines in raw capture: 19 -lines in archived block A: 6 -``` - -Thirteen lines removed. Corroborated across the whole file: - -``` -$ grep -nE 'seed:|stacktrace|Finished in|^\.+$|Compiling' logs/mutation.txt -NONE — every such line is absent from the archive -``` - -**Expected:** the bytes are the command's bytes. `CONVENTIONS.md:73-79` — "Either a command -reads the source and writes the file … or the file is not an archive and is not labelled one." - -**Why this is blocking and not a nit.** What was stripped is not noise. The failure body — -`negotiation_test.exs:184`, the assertion message, the `code:` line, the `stacktrace:` — *is* the -evidence that this mutant was killed by that specific assertion rather than by a compile error, a -different test, or nothing at all. The archive keeps the conclusion and discards the proof, which -is the precise shape `CONVENTIONS.md:91-93` names as the worst member of the family: "an archive -reported as verbatim but never fetched is indistinguishable from evidence." - -And this is the **third** occurrence in this slice and the **second** inside an artifact created -to close a finding about the first. Round 2 re-took two archives through `| tail -4` to fix a -verbatim finding; round 3 added `mutation.txt` to fix that, and filtered it. The three -run-logs that *were* in scope this round came out clean (below) — so the discipline landed on -the files under the finding and not on the new file created beside them. - -**A second, smaller part of the same defect.** `logs/mutation.txt:19-22`, the -`=== scoring summary ===` block, is authored prose — "no mutation of the code under review kills -it, because nothing on the ping path touches `shutdown?`" — which no command emits. It is good -prose and I agree with every word of it (I reached it independently in round 2). It does not -belong under a label that says the file was written by commands. Put it in `FINDINGS.md`, or -give it a header in the file that says it is the author's reading of the two captures above it. - -**The facts in the file are all correct — I checked them, and the defect is the form, not the -content.** Mutation A kills `:184`; mutation B kills `:191`; the third test is killed by neither. -I ran both myself, in round 2 and again now. Fixing this is a re-take, not a re-analysis. - ---- - -## Finding 2 — non-blocking. The corrected sentence still stands, uncorrected, 97 lines earlier - -`FINDINGS.md:92`: - -> Round 2 added three more tests, **scored by mutation below**, for a file total of 15. - -`FINDINGS.md:189-195` corrects exactly that claim — "Two of the three are mutation-killed; the -third is not, and cannot be". Both sentences are in the file, and the earlier one forward- -references "below", where the text now contradicts it. - -``` -$ grep -n "scored by mutation" slices/001b-ping-guard/FINDINGS.md -92:Round 2 added three more tests, scored by mutation below, for a file total of 15. -193:"scored by mutation" over a single mutant; both lanes caught it (r1 finding 1, r2 finding 4) and -``` - -Same class as r2's round-2 finding 2 (re-taking the evidence and leaving the quotation behind), -one round later, in the same file. Four words fix it. - ---- - -## Finding 3 — non-blocking. The third fresh count, as you predicted. The `.md` gap is nine, not two-plus-three - -You asked me to assume a third and look for it. Here it is. - -`FINDINGS.md`, "Recorded in round 2, not fixed", item 6: "**two** tracked root `.md` files carry -no SPDX header … That rationale covers the **three** `logs/spec-*.md` files exactly." - -Derived rather than typed, with the gate's own population command: - -``` -$ git ls-files -- '*.md' | while read f; do head -5 "$f" | grep -q SPDX-License-Identifier || echo " NO-SPDX: $f"; done - NO-SPDX: FINDINGS.md - NO-SPDX: PLAN.md - NO-SPDX: slices/001b-ping-guard/logs/round1.r1.md <- added in round 3, not mentioned - NO-SPDX: slices/001b-ping-guard/logs/round1.r2.md <- added in round 3, not mentioned - NO-SPDX: slices/001b-ping-guard/logs/round2.r1.md <- added in round 3, not mentioned - NO-SPDX: slices/001b-ping-guard/logs/round2.r2.md <- added in round 3, not mentioned - NO-SPDX: slices/001b-ping-guard/logs/spec-basic-versioning.md - NO-SPDX: slices/001b-ping-guard/logs/spec-changelog.md - NO-SPDX: slices/001b-ping-guard/logs/spec-legacy-basic.md -``` - -**Nine**, not two plus three. Round 3 tracked four reviewer reports, which sit in exactly the -position item 6 describes — tracked `.md`, no header, invisible to the gate — and for exactly the -reason item 6 gives: prepending an SPDX header to a lane's report would break the claim -`REVIEW.md:44-46` makes about it, that "the bytes are the reviewer's bytes, because the reviewer -wrote the file". The strongest argument in the item applies to the four files the item does not -name, in the round that added them. - -r2 flagged this population itself, in the header of its own archive -(`logs/round1.r2.md:9-12`): "If `.md` is ever added to that population this file and the two spec -archives all need a decision." That count is now three spec archives and four reports. - ---- - -## Finding 4 — note. `REVIEW.md` inflates one r1 severity by a cell - -`REVIEW.md:65` records r1's finding 6.3 as **non-blocking**. My report calls it a **note**: - -``` -$ grep -n "^### Finding 6\.3" logs/round1.r1.md -215:### Finding 6.3 — note. `logs/probe-after.txt` predates the `mix.exs` bump -``` - -6.4 on the next row is recorded correctly as a note. Every other row I checked against my own -archive is right — 2.1 blocking, 4 / 1c / 2.2 / 6.1 non-blocking, 2.3 note. One cell. - ---- - -## Finding 5 — note. `REVIEW.md:21-22` attributes to the lanes a step the lanes did not perform - -> Both lanes reviewed a checkout of the **index**, not the working tree — `git archive` of -> `git write-tree`'s output into a directory created empty and verified empty. - -What a lane can attest is the first half: I ran `git write-tree` in each checkout, got the hash -you named, and re-ran it at the end of round 1 to show the index had not moved. The second half — -that the directory was created empty and verified empty — describes what *you* did to build the -checkout, and neither lane witnessed it. I did create and verify-empty directories, but those -were my own mutant copies, not the review checkouts. In a file whose opening section is about not -letting a record read as a control, an unwitnessed step attributed to the reviewers is worth one -clause of rewording. - ---- - -## Finding 6 — note. `probe-after.txt` is the one run-log no reader can reproduce - -`FINDINGS.md` cites it as `$ mix run /probe_ping.exs`. That script is not in the -repository: - -``` -$ git ls-files tools/ -tools/gate.sh -$ git ls-files | grep -i probe -slices/001b-ping-guard/logs/probe-after.txt # the output, not the program -``` - -So of the five run-logs, four can be regenerated by anyone with the tree and one cannot. Its -bytes are genuine and its content is correct — I verified every line of it against my own probes -in round 2, and `lib/` has not moved since. Out of round-3 scope and recorded only; if -`probe_ping.exs` were tracked, this log would join the others. - ---- - -## Verified and closed — with bytes, not counts - -**Round-3 scope item 1 — the three run-logs are clean.** Fresh raw captures in my own copy, -`> file 2>&1`, diffed against the archives with only seed and timings normalised: - -``` -full-suite.txt IDENTICAL (no line stripped) -green-negotiation.txt IDENTICAL (no line stripped) -gate.txt BYTE-IDENTICAL (strict diff, nothing normalised) -``` - -The stripped `Running ExUnit with seed: N, max_cases: 64` line is back in both test logs. r2's -round-2 blocking finding is properly closed. - -**Round-3 scope item 3 — all three spec archives are byte-identical to my own fetches.** This is -the check I owed from round 2, where I compared `grep -F` hits instead of bytes. I fetched each -page myself and diffed: - -``` -$ curl -sSL --fail .../2026-07-28/basic/versioning.md -> spec-basic-versioning.md BYTE-IDENTICAL (11518 bytes) -$ curl -sSL --fail .../2026-07-28/changelog.md -> spec-changelog.md BYTE-IDENTICAL (11892 bytes) -$ curl -sSL --fail .../2025-11-25/basic.md -> spec-legacy-basic.md BYTE-IDENTICAL (11194 bytes) -``` - -They are the pages, unmodified. The new one carries the passage round 2's correction leans on, at -`spec-legacy-basic.md:73`: "The `result` **MAY** follow any JSON object structure." - -**My own two reports are unaltered.** `diff` of the tracked `logs/round1.r1.md` and -`logs/round2.r1.md` against the bytes I wrote: IDENTICAL, both. - -**The disclosed second `lib/` change, and its surviving mutant, are correctly reported.** I ran -that mutant myself rather than accepting the record — reverting `modernise(response, next)` to -`modernise(response, state)`, match count asserted, `mix compile --force`, then the suite: - -``` -before = 1 ; old_after = 0 ; new_after = 1 ; applied -15 tests, 0 failures -REAL_EXIT=0 # survives, exactly as recorded -``` - -A survivor that is correctly a survivor, reported as one. That is the right call and the right -disclosure. - -**Round-1 count text is still correct after round 3.** Re-derived, not read: nine pre-existing -tests at `base/main`, three round-1 additions, twelve at the round-1 index, fifteen now; the -round-1 Green block's `12 tests, 0 failures` and `36 tests, 0 failures` are the round-1 -measurements and their stale citations to the log files are gone, which is the right fix; the -scripted-edit table still has six data rows under "**Six** edits". The one residual is finding 2 -above. - -**`REVIEW.md`'s claims about the lanes check out**, apart from findings 4 and 5. Both tree hashes -at `REVIEW.md:26-27` match what each lane's archive says it read. Its quote of r1's round-1 close -is verbatim against `logs/round1.r1.md`. Its quote of r2's — "The `lib/` change is correct, -minimal, and I found nothing to fix in it" — is verbatim against `logs/round1.r2.md:195`. Its -round-2 tally, "r2: 1 blocking, 4 non-blocking", matches r2's own headers. Its statement that a -split verdict is not a pass, and that r2's blocking finding was fixed before signoff was -contemplated, is the right rule and I endorse it: **my round-2 approve was wrong on that file**, -and the reason it was wrong is that I checked numbers where the finding was about bytes. - -**Gate, read per step:** - -``` -$ ./tools/gate.sh; echo "gate exit=$?" -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - reuse pass (17 commentable files) - licence files pass -Gate OK. -gate exit=0 -``` - ---- - -## Summary - -The three logs this round was scoped to fix are genuinely fixed, and I checked them the way r2 -showed was necessary. All three spec archives are byte-identical to fetches I made myself. `lib/` -and `test/` have not moved. The surviving mutant is honestly disclosed and reproduces. The -substance of this slice has been right since round 1 and is still right. - -One blocking item: `logs/mutation.txt` is a filtered capture presented as command output, in the -file added to close a finding about filtered captures presented as command output. Thirteen lines -per block are gone, including the failure body that is the actual evidence of the kill. The facts -it states are all true and I verified each one, so the fix is a re-take with a redirect and a -header over the prose block — not a re-analysis. - -Three of the four remaining items are one-clause record fixes, and finding 3 is the third fresh -count you asked me to go looking for: the `.md` gap is nine files, not five, and the four the -item omits are the four this round added. - -VERDICT: changes required diff --git a/slices/001b-ping-guard/logs/round3.r2.md b/slices/001b-ping-guard/logs/round3.r2.md deleted file mode 100644 index 3d43e503..00000000 --- a/slices/001b-ping-guard/logs/round3.r2.md +++ /dev/null @@ -1,184 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 3, security, contract and evidence integrity -Type: Report - -**Tree read:** `7772c2a8d4bc6feefd96234c696ce4ccb9209d38` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review3 && git write-tree -7772c2a8d4bc6feefd96234c696ce4ccb9209d38 -``` -Written to `logs-r2.tree` in that checkout. Matches the hash you named. - -**`lib/` and `test/` are byte-identical to round 2 — confirmed, not taken from you:** - -``` -$ git -C 001b-ping-guard diff 867f28ce…7772c2a8 -- lib test | wc -l -0 -``` -So my round-1 and round-2 conclusions about `lib/` stand on bytes I read, and I did not re-probe behaviour this round. - ---- - -## Your blocking finding is closed, and closed the right way - -I compared bytes, not counts, as you asked. - -``` -$ cd 001b-review3 && mix test > f3.out 2>&1 ; diff f3.out slices/001b-ping-guard/logs/full-suite.txt -1,3c1 -< Compiling 5 files (.ex) -< Generated beam_mcp app -< Running ExUnit with seed: 803315, max_cases: 64 ---- -> Running ExUnit with seed: 627805, max_cases: 64 -6c4 -< Finished in 1.0 seconds (0.04s async, 0.9s sync) ---- -> Finished in 1.1 seconds (0.06s async, 1.1s sync) - -$ mix test test/beam_mcp/negotiation_test.exs > n3.out 2>&1 ; diff n3.out slices/…/green-negotiation.txt -1c1 -< Running ExUnit with seed: 245939, max_cases: 64 ---- -> Running ExUnit with seed: 324065, max_cases: 64 -4c4 -< Finished in 0.04 seconds (0.04s async, 0.00s sync) ---- -> Finished in 0.05 seconds (0.05s async, 0.00s sync) - -$ ./tools/gate.sh > g3.out 2>&1 ; diff g3.out slices/…/gate.txt && echo IDENTICAL -IDENTICAL -``` -Every remaining difference is a value that genuinely varies between runs — the seed, the wall-clock timings, and three `Compiling` lines because my checkout's `_build` was cold and yours was warm. The structural lines are identical: `Running ExUnit with seed:` is **present** in both files, the progress-dot lines match exactly (`39` dots and `15` dots), and the count lines read `39 tests, 0 failures` and `15 tests, 0 failures`. `gate.txt` is byte-for-byte identical to a fresh run and all six steps' own lines read `pass`, `reuse pass (17 commentable files)`. - -Nothing was stabilised and nothing was stripped. Round-2 finding 1 is closed. - ---- - -## Findings - -### 1. `logs/mutation.txt` is a curated extract labelled as an archive — **blocking** - -`slices/001b-ping-guard/logs/mutation.txt`, labelled at `slices/001b-ping-guard/FINDINGS.md:195` and again at `slices/001b-ping-guard/REVIEW.md:124`, both reading "written by the commands that ran them". - -**Observed** — I re-ran mutation A myself in a copy, asserting mutator, `> file 2>&1`, no pipe. The raw capture is 25 lines: - -``` -==> file_system -Compiling 7 files (.ex) -… (dependency compile lines) … -==> beam_mcp -Compiling 5 files (.ex) -Generated beam_mcp app -Running ExUnit with seed: 83300, max_cases: 64 - -........... - - 1) test state threads through both era branches shutdown declaring 2025-11-25 through _meta still sets shutdown? (BeamMCP.NegotiationTest) - test/beam_mcp/negotiation_test.exs:184 - the legacy branch returns the recursion's tuple whole; if it returned the pre-recursion state instead, the transport would never stop - code: assert Server.shutdown?(send_for_state(legacy_meta("shutdown"))), - stacktrace: - test/beam_mcp/negotiation_test.exs:185: (test) - -... -Finished in 0.03 seconds (0.03s async, 0.00s sync) -15 tests, 1 failure -``` -`mutation.txt:4-6` carries three of those lines. Absent: the `Running ExUnit with seed:` line, the progress-dot lines, the `Finished in …` line, `Compiling 1 file (.ex)`, and — the part that matters most — four of the five lines of the failure block. The archive keeps `1) test …` and drops the assertion message, the `code:` line and the `stacktrace:` line, which are the lines that identify *which* assertion failed and why. That is the same `grep`/`tail` shape I demonstrated in round 2, on a file added this round to close that family. - -**Expected** — `CONVENTIONS.md:73-79`: "Either a command reads the source and writes the file — so the bytes are the source's bytes — or the file is not an archive and is not labelled one." - -Three things I want to be exact about, because they change what this costs rather than whether it stands: - -- **The content is correct.** I independently ran both mutations in a scratch copy and got the same verdicts, the same test names, the same `15 tests, 1 failure`, and the same exit 2. Nothing here is fabricated, and I am not asking you to redo the mutation work. -- **The file self-signals in part.** Lines 17-21 are visibly a hand-written scoring summary and read as one. That is honest. It is the first sixteen lines, which read as captured output and are not, that carry the problem. -- **I am holding the line I held in round 2, on purpose.** The identical defect on a different file cannot be blocking one round and a note the next, or the standard is whatever the reviewer feels like that morning. The fix is one word in two places — call it a scoring summary rather than an archive — or `> file 2>&1` the two runs and let the summary sit beside them. Either clears it. - -### 2. The `.md` SPDX gap is now nine files, and the item that records it says three — non-blocking - -`slices/001b-ping-guard/FINDINGS.md:265-273`, item 6 of the round-2 out-of-scope list. - -**Observed** — the item says "two tracked root `.md` files carry no SPDX header", that the `.txt` rationale "covers the three `logs/spec-*.md` files exactly", and that "round 2 widened the `.md` gap by three". Derived from the tree the way the gate derives its own population: - -``` -$ git ls-files -- '*.md' | while read -r f; do head -5 "$f" | grep -q 'SPDX-License-Identifier' || echo " $f"; done - FINDINGS.md - PLAN.md - slices/001b-ping-guard/logs/round1.r1.md - slices/001b-ping-guard/logs/round1.r2.md - slices/001b-ping-guard/logs/round2.r1.md - slices/001b-ping-guard/logs/round2.r2.md - slices/001b-ping-guard/logs/spec-basic-versioning.md - slices/001b-ping-guard/logs/spec-changelog.md - slices/001b-ping-guard/logs/spec-legacy-basic.md -$ … | wc -l -9 -``` -**Nine**, not five. Round 3 tracks four reviewer-report `.md` files, and this round will add two more. The sentence about round 2 is true of round 2; the item reads as the current state of the gap and is four files short of it — and it will be six short once the round-3 reports land. - -The distinction the item draws is the useful one and it does not survive the extension: the `curl -o` rationale is why the three `spec-*.md` files *should* carry no header, and it **does not apply** to the four lane reports, which are authored prose, not fetched bytes. Those four are ordinary `.md` files that the tree's own convention would header and the gate cannot see. My own `round1.r2.md` header says exactly this and predicted it. Extend the item to the population as it stands, or derive the number with the command above instead of writing one. - -This is the "assume I wrote a fresh count again" check you asked for. It is the only one I found: `15`/`39` match the archives, "two of the three" is right, "three `spec-*.md`" is right, "two tracked root `.md` files" is right, and the semver and gate quotations all match their sources. - -### 3. `FINDINGS.md` has no round-3 section, so the evidence log does not record the blocking finding or its fix — non-blocking - -`slices/001b-ping-guard/FINDINGS.md` headings run `# Round 2 — what the two reviewer lanes changed` and stop; every round-3 edit was folded into the round-1 and round-2 sections. The round-3 narrative exists only in `REVIEW.md:94-105`, which tells it well. - -The consequence is specific rather than stylistic. `FINDINGS.md:234-235` still reads "**Re-taken against the final tree**, and `logs/full-suite.txt` and `logs/green-negotiation.txt` re-taken with it." That sentence is not false — they were re-taken against the final tree — but it is the record of the exact re-take that turned out to be filtered, and nothing in the evidence log says so. A reader of `FINDINGS.md` alone learns that these two archives were re-taken once and soundly. They were re-taken twice, and the first re-take is the sharpest finding in the slice. `FINDINGS.md:9-11` opens by asserting that every file under `logs/` is an archive written by its command; the one round where that was untrue is missing from the file that makes the claim. - -### 4. `REVIEW.md`'s index-hash list stops at round 2 — note - -`slices/001b-ping-guard/REVIEW.md:26-27` records the round-1 and round-2 tree hashes under "What *is* mechanical, and is the closest thing here to a binding". Round 3's `7772c2a8d4bc6feefd96234c696ce4ccb9209d38` is not in that list, though `REVIEW.md:118-137` describes round 3 at length. If the hash list is the binding, it should carry every round it claims to bind. - ---- - -## What I verified and found correct - -**The third spec archive is genuine.** Independent fetch, byte comparison, matching digest: - -``` -$ curl -sSL --fail -o rf-legacy.md https://modelcontextprotocol.io/specification/2025-11-25/basic.md -$ diff slices/…/logs/spec-legacy-basic.md rf-legacy.md && echo IDENTICAL -IDENTICAL -$ sha256sum … -a504a34039368f1cb715096d664f234ce7e1af4511e6ad3fd41e901d8040b97e logs/spec-legacy-basic.md -a504a34039368f1cb715096d664f234ce7e1af4511e6ad3fd41e901d8040b97e rf-legacy.md -``` -All three `spec-*.md` archives now verify against my own fetches. `PLAN.md:17-26`'s list of three is complete: `grep -rn 'modelcontextprotocol.io'` across the slice's own `.md` files returns one hit, the URL line in the PLAN, and no page is quoted that is not archived. Round-2 finding 5 is closed. - -**The mutation content is right, independently.** My M1 and M2 reproduce `mutation.txt`'s verdicts exactly — same tests at `:184` and `:191`, `15 tests, 1 failure`, exit 2 — and my M3 reproduces the survivor. The scoring summary at `mutation.txt:17-21` states the honest result, including that the third test is unscored and why. Round-2 finding 4 is closed on substance; only the label in finding 1 above is outstanding. - -**The disclosure of the `lib/` change is adequate — more than adequate.** `FINDINGS.md:208-226` names the edit, attributes it to r1's note 2.3, quotes the mutant with `REAL_EXIT=0` and "the mutant **SURVIVES**", says the change is unfalsifiable today and kept deliberately as defence against a latent trap, and states the principle: an undisclosed edit is a defect in the record whether or not it is one in the code, and a correctly-surviving mutant still has to be reported as a survivor. `REVIEW.md:112-116` carries the same. That is exactly what I asked for and it does not overstate. Round-2 finding 3 is closed. - -**The Green block is fixed correctly.** `FINDINGS.md:97-109` keeps the round-1 counts as the round-1 record, removes the citations that pointed at bytes saying something else, and states what the archives now read. `FINDINGS.md:285-288` carries the current counts. `grep -n '36 tests\|12 tests'` returns only those labelled instances and the `12 tests, 2 failures` red, which still matches `logs/red.txt`. Round-2 finding 2 is closed. - -**The CHANGELOG's new clause is true, and I checked it rather than reading it.** `0.1.0` and `0.1.1` do name the same before-state: - -``` -$ git show v0.1.0:lib/beam_mcp/server.ex | sed -n '/_meta" => %{@version_meta_key/,/^ end$/p' > a -$ git show base/main:lib/beam_mcp/server.ex | sed -n '/_meta" => %{@version_meta_key/,/^ end$/p' > b -$ diff a b && echo CLAUSE BYTE-IDENTICAL -CLAUSE BYTE-IDENTICAL -``` -**My own lane reports are stored unmodified.** `diff` of `logs/round1.r2.md` and `logs/round2.r2.md` against the bytes I wrote: identical, both. I checked because they are now evidence in the tree and I am the only party who can certify them. - -**`REVIEW.md` is honest about what it is.** It leads with the absence of `tools/signoff.sh`, says a record is not a control, and says a split verdict is not a pass — and it did not treat one as such. Its account of my round-2 blocking finding is accurate, including the `| tail -4` mechanism, which checks out arithmetically against the round-2 files (5 raw lines, 4 archived, seed line lost). Its summary of my findings and severities matches my reports row for row, and `r2: 1 blocking, 4 non-blocking` is exactly right. - ---- - -## Summary - -`lib/` and `test/` are unchanged and unchallenged. The blocking finding from round 2 is properly closed — the three archives are the commands' bytes, and I proved it by byte comparison rather than by counting. The third spec archive verifies against my own fetch. The `lib/` disclosure is complete and the mutation scoring is now stated honestly. - -One thing blocks, and it is the same rule a third time: `logs/mutation.txt` is a curated extract carrying the label "written by the commands that ran them" in two places. Its content is correct and I reproduced it, so this is a labelling fix of one word in two files, not a re-run. I am not softening it, because the standard cannot move between rounds. - -**VERDICT: changes required** diff --git a/slices/001b-ping-guard/logs/round4.r1.md b/slices/001b-ping-guard/logs/round4.r1.md deleted file mode 100644 index 35b8509a..00000000 --- a/slices/001b-ping-guard/logs/round4.r1.md +++ /dev/null @@ -1,232 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 4, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review4 && git write-tree -76452890d117e264ec634335f5568a940ecc3c25 -``` - -Matches the hash you named. Written to `001b-review4/logs-r1.tree`. - -**`lib/` and `test/` byte-identical to `867f28ce` — verified, not taken from you.** Whole-subtree -object hashes at both trees: - -``` -040000 tree 13a26a2a1462a424f31fa2f7c04b208d9ad27ceb lib # identical at 867f28ce and 76452890 -040000 tree a3bacd2b33321c83126ccf20fc31a6990f74a693 test # identical at both -``` - ---- - -## Finding 1 — **BLOCKING.** `logs/archive-sweep.txt` states a false verdict, cannot be re-run, and does not do what the record says it does - -You pointed me at this file as the likely hiding place. It is, on four counts. **None of the -seventeen archives it audits is actually bad** — I verified every one of them myself, below — so -the defect is confined to the instrument. But the instrument is tracked, is offered as this -round's central evidence (`REVIEW.md:178-181`, "`logs/archive-sweep.txt` is that sweep's own -output"), and is wrong. - -**(a) It ships a verdict that is false for the tree it ships in.** `archive-sweep.txt:28-31`: - -``` -0a1,2 -> Compiling 1 file (.ex) -> Generated beam_mcp app -probe-after.txt DIFFERS -- see above -``` - -In this tree, `probe-after.txt` does **not** differ. Regenerated from the tracked probe, using -exactly the command in its own docstring, in a directory created empty and verified empty -(`0 entries`) and populated by `git archive` from this index: - -``` -$ mix run tools/probe_ping.exs > /tmp/pa.txt 2>&1 -$ diff /tmp/pa.txt slices/001b-ping-guard/logs/probe-after.txt - BYTE-IDENTICAL -``` - -The `>` side of the sweep's diff carries the two compile lines, which the archive in this tree -does not have (`git diff` for round 4 removes exactly those two lines). So the sweep ran -**before** `probe-after.txt` was re-taken and was shipped unchanged. That is r2's round-2 finding -1 in kind — an archive that does not describe the tree it ships with — occurring in the file -built to detect that class. `REVIEW.md:186-188` explains the difference correctly in prose, so -prose and artifact now disagree, and a reader who opens the artifact to check the prose finds a -`DIFFERS` contradicting it. - -**(b) It cannot be re-run, which is the defect round 4 just closed for `probe-after.txt`.** - -``` -$ git ls-files tools/ -tools/gate.sh -tools/probe_ping.exs -$ git ls-files | grep -i sweep -slices/001b-ping-guard/logs/archive-sweep.txt # the output; no script -$ grep -rn "archive-sweep" FINDINGS.md REVIEW.md PLAN.md -REVIEW.md:180: … `logs/archive-sweep.txt` is that sweep's own output -``` - -The script is not tracked and no record names its command line. My round-3 finding 6 was exactly -this about `probe-after.txt`; you closed it properly by tracking `tools/probe_ping.exs` — and the -new file introduced in the same round reintroduces it. Because of (a), this matters more than it -did for `probe-after.txt`: a reader who notices the stale `DIFFERS` has no way to re-derive the -correct answer. - -**(c) It does not classify "each" by comparison against a fresh capture.** Of the seventeen files -in its own population: - -| files | what the sweep actually does | -|---|---| -| `full-suite`, `green-negotiation`, `gate`, `probe-after` | byte comparison against a fresh run — 4 of 17, and the one non-clean verdict is stale | -| `mutation-a`, `mutation-b` | a marker `grep` (`Compiling`, `stacktrace lines kept: 1`) — not a byte comparison | -| `spec-basic-versioning`, `spec-changelog`, `spec-legacy-basic` | filed at line 44 under "**authored prose, NOT captures**" — and never re-fetched | -| six `round*.md` | correctly need no capture check | -| `archive-sweep.txt` itself | listed in the population at line 4, never classified | - -The `spec-*.md` row is the sharpest: the section heading calls them "NOT captures" while the -file's own footnote two lines down (`:55`) says "the fetch IS the command; bytes are the source's". -They are captures, and the consequence of filing them as prose is that the sweep skips the one -check that can validate them — a re-fetch. I ran it; see below. - -`archive-sweep.txt:34-37` is also uninterpretable as output: two bare `Compiling 5 files (.ex)` -lines and two `stacktrace lines kept: 1` lines, with no filename attached to either pair. A -reader cannot tell which belongs to `mutation-a` and which to `mutation-b`. - -**(d) The population is derived plus a hand addition, under a line saying it is not.** -`archive-sweep.txt:2-3`: - -``` -Derived, not listed by hand: - $ git ls-files -- 'slices/001b-ping-guard/logs/*' ; plus files staged this round -``` - -"Plus files staged this round" is the hand part. `CONVENTIONS.md:20-37` is a whole section on -this: "derive the probe's input the way the mechanism derives its own — same command, same source -of truth." `git ls-files` does not see unstaged files; `git status --porcelain` or a staged-index -listing would, and would be derived. The list happens to be complete for this tree — I checked it -against `git ls-files slices/001b-ping-guard/logs/`, seventeen and seventeen — so this is about -the method, not a missed file. - -**Also, minor within the same file:** there is no summary or exit line, so the single `DIFFERS` -sits at line 31 of 55 with nothing at the end to surface it. `CONVENTIONS.md:36` — "read the -step's line, not just the exit code" — cuts both ways: a report with neither is one a reader -skims as a pass. - -**The fix is mechanical:** track the script, re-run it against this tree, label the `spec-*.md` -files as the fetch captures they are and re-fetch them, attach filenames to the mutation lines, -classify the sweep itself or exclude it explicitly, derive the population from the index, and end -with a count. - ---- - -## Finding 2 — non-blocking. The fourth fresh count, and it is inside the table that catalogues them - -`FINDINGS.md:202` and `FINDINGS.md:328` both say the deleted `mutation.txt` "dropped … **four of -the five** lines of the failure block". - -Measured against the raw capture that is now in the tree, and against the deleted file at the -round-3 tree: - -``` -$ sed -n '7,12p' logs/mutation-a.txt # the failure block in a RAW capture - 1) test state threads through both era branches shutdown declaring 2025-11-25 … (BeamMCP.NegotiationTest) - test/beam_mcp/negotiation_test.exs:184 - the legacy branch returns the recursion's tuple whole; … - code: assert Server.shutdown?(send_for_state(legacy_meta("shutdown"))), - stacktrace: - test/beam_mcp/negotiation_test.exs:185: (test) - -> header line + 5 indented lines - -$ (round-3 tree) logs/mutation.txt — indented lines kept from that block - 0 -``` - -The header survived and **all five** indented lines were dropped, not four of five. The claim -understates the loss by one line and appears twice, once in the row of the instance table that -records this exact family. Round 3's report gave the figure as thirteen lines per block total, -which is the same measurement from the other end. - ---- - -## Verified and closed — every one by bytes - -**Round-3 blocking (`mutation.txt`) — closed properly.** I re-ran both mutations from a fresh copy -(directory created empty and verified empty, `git archive` from this index, match counts asserted -before and after, compile before scoring) and byte-diffed against the new logs: - -``` -mutation-a.txt matches my raw capture on every line except the seed, the timing, - and the distribution of progress dots either side of the failure -mutation-b.txt same, plus the compile-count line and the anonymous-function ref - -dot totals: mine-A 14 archived-A 14 final line both: 15 tests, 1 failure - mine-B 14 archived-B 14 final line both: 15 tests, 1 failure -``` - -Fourteen passing dots plus one failure is fifteen on both sides of both files, so the dot -difference is ExUnit's async ordering, not content. The full failure body — `:184`/`:190`, the -assertion message, `code:`, `stacktrace:` and its target — is present in both. These are raw -captures. - -**Round-3 finding 6 (`probe-after.txt` unreproducible) — closed, and better than recorded.** -`tools/probe_ping.exs` is tracked, carries an SPDX header, and names its own command in a -docstring. Regenerated from it: **BYTE-IDENTICAL**. All five run-logs are now regenerable from -the tree. - -**The other three run-logs, re-verified at this tree, not carried over from round 3:** - -``` -full-suite.txt RAW / identical (seed and timing normalised) -green-negotiation.txt RAW / identical -gate.txt BYTE-IDENTICAL on a strict diff, and correctly updated 17 -> 18 -``` - -**The REUSE count moved for the right reason.** `tools/probe_ping.exs` is a tracked `.exs` with an -SPDX header, so the gate's `git ls-files`-derived population is 18. Your note that it read 17 -until the file was staged is the same property `CONVENTIONS.md:27-30` records about the original -REUSE probe, and it is correct behaviour, not a defect. - -**Spec archives:** unchanged this round (`git diff --stat` for `logs/spec-*` is empty), and I -proved all three byte-identical to my own `curl -sSL --fail` fetches in round 3 — 11518, 11892 and -11194 bytes. That check is the one finding 1(c) says the sweep skips; it passes. - -**Record fixes, each checked:** - -- `FINDINGS.md:92` no longer forward-references a claim the text below corrects; it now reads - "two of them mutation-killed, the third an unscored guard", agreeing with `:190`. -- The `.md`-gap item is now derived by command and **carries no hand count that can go stale** — - it says "the three `logs/spec-*.md` files" and "the reviewer-lane reports", not a total. My own - derivation returns eleven today and will return thirteen once this round's reports land; the - item's wording survives both. That is the right shape of fix. -- `REVIEW.md:74` — `| 6.3 / 1 | r1 note, r2 non-blocking |`. Correct against my archive - (`round1.r1.md:215` reads "note"). -- `REVIEW.md:21-26` — the attribution is fixed, and fixed further than I asked: it separates what - a lane can attest from the checkout construction, names it as your step that **no lane - witnessed**, and elsewhere labels the one remaining inference as yours. `REVIEW.md:30-33` also - adds round 3's hash, which was missing. -- `logs/round3.r1.md` as tracked is **byte-identical** to what I wrote. - ---- - -## Summary - -The round-3 blocking finding is properly closed: both mutation logs are genuine raw captures, and -I reproduced them rather than reading them. `probe-after.txt` is regenerable from a tracked probe -and byte-identical to a fresh run. The other three run-logs and all three spec archives verify. -The record fixes are all correct, and the `.md`-gap fix is the right kind — it removed the hand -count instead of correcting it. `lib/` and `test/` have not moved since `867f28ce`. - -One blocking item, and it is the file you flagged: `logs/archive-sweep.txt` ships a `DIFFERS` -verdict that is false for this tree, cannot be re-run because its script is untracked and its -command unnamed, byte-compares four of seventeen files while `REVIEW.md` says it compares each, -files three fetch captures as "authored prose" and so never re-fetches them, and never classifies -itself. Every archive it audits is clean — I checked all of them — so this is a defect in the -instrument alone, and the fix is mechanical. - -Plus the fourth hand-written count, sitting in the instance table: five of five failure-block -lines were dropped, not four of five. - -VERDICT: changes required diff --git a/slices/001b-ping-guard/logs/round4.r2.md b/slices/001b-ping-guard/logs/round4.r2.md deleted file mode 100644 index 251924bb..00000000 --- a/slices/001b-ping-guard/logs/round4.r2.md +++ /dev/null @@ -1,147 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 4, security, contract and evidence integrity -Type: Report - -**Tree read:** `76452890d117e264ec634335f5568a940ecc3c25` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review4 && git write-tree -76452890d117e264ec634335f5568a940ecc3c25 -``` -Written to `logs-r2.tree` in that checkout. Matches the hash you named. - -**`lib/` and `test/` byte-identical to `867f28ce` — confirmed, not taken from you:** - -``` -$ git -C 001b-ping-guard diff 867f28ce…76452890 -- lib test | wc -l -0 -``` -My round-1 and round-2 conclusions about `lib/` stand on bytes I read. I did not re-probe behaviour this round. - ---- - -## The blocking finding is closed, and this is the strongest evidence in the slice - -I re-ran both mutations myself, in two fresh copies, asserting mutator (`before=1 old_after=0 new_after=1` each), `mix compile --force` before scoring, `> file 2>&1`, no pipe. - -`mutation-a.txt` against my raw capture — identical on every structural and content line: - -``` -Running ExUnit with seed: … present in both - 1) test … shutdown declaring 2025-11-25 through _meta still sets shutdown? both - test/beam_mcp/negotiation_test.exs:184 both - the legacy branch returns the recursion's tuple whole; … both - code: assert Server.shutdown?(send_for_state(legacy_meta("shutdown"))), both - stacktrace: both - test/beam_mcp/negotiation_test.exs:185: (test) both -Finished in 0.03 seconds … present in both -15 tests, 1 failure both -``` -`mutation-b.txt` likewise, including the `arguments:` block with the inspected state map (`shutdown?: false`) that ExUnit prints for a bare `assert` — seven lines that a `grep -E` would have removed and that are present in full. - -Differences, all of them values that must vary: the seed, the wall-clock timings, the split of progress dots around the failure (async scheduling), the dependency-compile prefix (build state), and the `#Function<0.370214/3>` reference id, which is generated per run. **The failure bodies are complete**, which was the whole point — those lines are what establish the mutant was killed *by that assertion* rather than by a compile error or by an unrelated failure. You kept that framing and it is the right one. - -`mutation.txt` is gone from the tracked set (`git ls-files -- '*mutation*'` returns only `-a` and `-b`). Round-3 finding 1 is closed. - ---- - -## The sweep, checked the way you asked - -**Its population is genuinely derived.** I compared the listing against the tracked set with the sweep's own command: - -``` -$ git ls-files -- 'slices/001b-ping-guard/logs/*' | xargs -n1 basename | sort > actual -$ sed -n '4,20p' logs/archive-sweep.txt | sort > swept -$ diff actual swept && echo "SWEEP POPULATION == TRACKED logs/ SET" -SWEEP POPULATION == TRACKED logs/ SET -``` -Seventeen files, exact match, nothing omitted and nothing invented. That is a population, not a list, and it is the first thing in this slice that can be said of. - -Three findings against the sweep and the record it feeds. None of them is an archive whose bytes are not its command's — the fourth instance is not hiding there. - -### 1. `REVIEW.md:186-187` states the `probe-after.txt` comparison backwards — non-blocking - -**Observed** — it reads: "`probe-after.txt` differed from a fresh run only by carrying *more* lines — a compile step — which is the opposite of filtering." - -The shipped archive carries **fewer** lines than a fresh run, not more. The sweep's own output says so: - -``` -0a1,2 -> Compiling 1 file (.ex) -> Generated beam_mcp app -probe-after.txt DIFFERS -- see above -``` -`0a1,2` with the lines on the `>` side puts the two extra lines in the *second* file of the comparison, and the shipped `probe-after.txt` does not contain them — it is 14 lines beginning at `beam_mcp version: 0.1.2`. I measured it three ways from the newly tracked probe, in a fresh copy: - -``` -$ mix run tools/probe_ping.exs > probe_cold.out 2>&1 # cold _build -$ mix run tools/probe_ping.exs > probe_warm.out 2>&1 # immediately again -cold run: 48 lines ; warm run: 14 lines ; archive: 14 lines - -$ diff probe-after.txt probe_cold.out -0a1,34 -> ==> earmark_parser -… 34 lines of dependency compilation … - -$ diff probe-after.txt probe_warm.out && echo "ARCHIVE BYTE-IDENTICAL TO A WARM FRESH RUN" -ARCHIVE BYTE-IDENTICAL TO A WARM FRESH RUN -``` -**Expected** — the conclusion in `REVIEW.md` is right and the reason is inverted, which matters more than a normal wording slip because of what the reason teaches. "The archive has more lines than the run" would indeed be evidence against filtering. "The archive has fewer lines than the run" is the *signature* of filtering — it is precisely what I found in instances #2 and #3. Here it is innocent for a different reason: the missing lines are build noise that a warm run legitimately omits, and the proof is that the archive equals a warm fresh run byte-for-byte. A reader who learns the test as "fewer lines is fine, I checked once" has learned the wrong lesson from the round whose subject is byte comparison. - -The available sentence is both correct and stronger than the one there: `probe-after.txt` is byte-identical to a fresh run of `tools/probe_ping.exs` on a warm build; against a cold build it differs only by dependency-compile lines that no run of the probe itself emits. That is the best verdict any file in this slice has, and the record currently understates it while mis-stating the direction. - -### 2. The sweep files the three `spec-*.md` archives under "NOT captures", then says they are captures — non-blocking - -`slices/001b-ping-guard/logs/archive-sweep.txt:44-55`. The heading reads "authored prose, NOT captures, must not be labelled archives of a command" and lists the three spec files under it; the footnote at `:55` then reads `spec-*.md = curl -sSL --fail -o (the fetch IS the command; bytes are the source's)`. Both cannot be true, and the footnote is the true one. - -The consequence is not cosmetic: **the only three files in the population that can be checked against a source outside the tree are the three the sweep does not check.** Grouping them with prose is what excuses skipping them. I checked all three, again: - -``` -$ curl -sSL --fail -o rf-v.md …/2026-07-28/basic/versioning.md -$ curl -sSL --fail -o rf-c.md …/2026-07-28/changelog.md -$ curl -sSL --fail -o rf-l.md …/2025-11-25/basic.md -$ diff … && echo IDENTICAL → IDENTICAL, all three -28c417b3… spec-basic-versioning.md 203d3c99… spec-changelog.md a504a340… spec-legacy-basic.md -``` -They pass. Split the section: fetched bytes are captures and should be re-fetched and diffed; the six `round*.md` files are the only genuine "authored prose" entries. - -### 3. The sweep's three most load-bearing verdicts are echoed, not shown — non-blocking - -`archive-sweep.txt:25-27` reads `full-suite.txt RAW (identical modulo seed/timing)`, `green-negotiation.txt RAW`, `gate.txt RAW (byte-identical)` — with no diff output beneath any of them, while `probe-after.txt` gets actual diff bytes at `:28-30`. A plain `diff` of `full-suite.txt` against a fresh run is never empty: the seed and the timings always differ, which I have now demonstrated in three consecutive rounds. So the script must be normalising before it compares, and the file neither says that nor shows the normalised comparison. For those two entries the sweep is asserting its conclusion in an `echo`, which is the shape of evidence rather than evidence. - -Nothing is wrong underneath it — I verified all three independently in this checkout, and `gate.txt` really is byte-identical (`diff` empty, exit 0, `reuse pass (18 commentable files)`). But a sweep whose purpose is "do not trust a claim, diff the bytes" should print the bytes it diffed, including the normalisation it applied, for every entry and not only the one that failed. - -### 4. The sweep's mutation entry carries no filename and no verdict — note - -`archive-sweep.txt:33-37` prints two unlabelled pairs — `Compiling 5 files (.ex)` and `stacktrace lines kept: 1`, twice — with no filename against either and no `RAW`/`DIFFERS` classification for either. The two files this round exists to produce are the least conclusive entry in the file that classifies them. Both are in fact raw; I established that above, and the sweep could have said so. - ---- - -## What I verified and found correct - -**`tools/probe_ping.exs` closes the regenerability gap properly.** It is tracked, carries the SPDX header at lines 1-2, and its comment names the finding it answers. `probe-after.txt` regenerates from it byte-identically on a warm build, so all five run-logs are now reproducible by anyone with the tree — which is a stronger property than any of them had before. The gate moved `17 → 18` and `gate.txt` records `reuse pass (18 commentable files)`; my fresh `./tools/gate.sh` in this checkout is byte-identical to the archive, exit 0, six `pass` lines. Your observation that the gate read 17 until the file was staged is right and is the `CONVENTIONS.md:20-37` trap exactly — the population comes from `git ls-files`, so an unstaged file is invisible to it. - -**My finding 2 is closed structurally, not numerically.** `FINDINGS.md` item 6 now carries the derivation command instead of a number, so there is nothing left to go stale — the count is 11 today and the item does not say 11. It also draws the distinction that mattered: the `curl -o` defence covers the three `spec-*.md` files exactly and does **not** cover the lane reports, which are ordinary authored `.md` files the convention would header. That is the correct shape. - -**My finding 3 is closed well.** The rounds-3-and-4 section exists, and its recurrence table is the most useful thing in the record: three instances, one per round, with "Each fix introduced the next defect" stated rather than smoothed. `FINDINGS.md:234-235` is corrected by the new section rather than rewritten, which is the convention's rule followed literally. The "why counting is not checking" section generalises it correctly. - -**My finding 4 is closed** — the tree-hash list carries round 3. Round 4's row says "see the commit" rather than `76452890…`; that is defensible while the round is open, and the hash is in this report. - -**The record's account of round 3 is accurate.** The mechanism claim in the recurrence table — `{ … } | tee` with `mix test` piped through `grep -E` — matches what I demonstrated by raw capture. `REVIEW.md` records r1's unprompted retraction of its round-2 approve and quotes my refusal to soften the severity; both are reported accurately and neither is dressed up. - ---- - -## Summary and verdict - -The population was swept rather than the instance patched, and it worked: `mutation-a.txt` and `mutation-b.txt` reproduce line-for-line against my own raw runs with the failure bodies intact, `probe-after.txt` is byte-identical to a warm fresh run from a now-tracked probe, `gate.txt` is byte-identical, the sweep's population matches the tracked set exactly, and all three spec archives still match independent fetches. **No file in this tree is labelled an archive whose bytes are not its command's.** That was the standard I applied for three rounds and it is met. - -What is left is three corrections to how the sweep and the review record *describe* their own evidence — the inverted probe-after direction, the spec files filed under "not captures", and two verdicts echoed instead of shown. None of them is a defective artifact, none touches `lib/`, `test/`, or any measured result, and I am not holding the slice for them. I would want finding 1 fixed because it teaches the wrong test to the next reader, but I am not making my verdict conditional on seeing it, and I will not manufacture a fourth blocking finding to be consistent with having found three. - -**VERDICT: approve** diff --git a/slices/001b-ping-guard/logs/round5.r1.md b/slices/001b-ping-guard/logs/round5.r1.md deleted file mode 100644 index 1d4b08bc..00000000 --- a/slices/001b-ping-guard/logs/round5.r1.md +++ /dev/null @@ -1,234 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 5, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review5 && git write-tree -de326400ca2ccb7bcf97d0a830e8725dbae7da31 -``` - -Matches the hash you named; `git status --short` is clean. Written to `001b-review5/logs-r1.tree`. - -**`lib/` and `test/` still byte-identical to `867f28ce` — verified.** Subtree object hashes -`13a26a2a1462a424f31fa2f7c04b208d9ad27ceb` (lib) and `a3bacd2b33321c83126ccf20fc31a6990f74a693` -(test) at both trees. - ---- - -## The check that matters most, first: the sweep reproduces - -I did not read `archive-sweep.txt` and believe it. I ran the tracked script in a directory -created empty and verified empty (`0 entries`), populated by `git archive` from this index with -`deps/` and `_build/` copied and `git init` + `git add -A` so that `git ls-files` sees the same -population (verified: `diff` of the two populations is empty), then byte-diffed: - -``` -$ ./tools/archive_sweep.sh > /tmp/sweep-fresh.txt 2>&1 ; echo exit=$? -exit=0 -$ diff /tmp/sweep-fresh.txt slices/001b-ping-guard/logs/archive-sweep.txt - BYTE-IDENTICAL — the tracked output is this script's output, reproduced -``` - -That is the strongest verdict any artifact in this slice has carried, and it settles points (a), -(b) and (d) of my round-4 finding outright: the file is regenerable, its population is purely -`git ls-files -- "$L/*"`, and it contains **zero** `DIFFERS`. The reproduction also means the -three upstream re-fetches at `archive-sweep.txt:75-77` actually ran and actually matched, on my -network, not yours — independently of the byte-identical `curl` diffs I did in round 3. - ---- - -## Finding 1 — **BLOCKING.** `red.txt` is enumerated in the population and never classified - -`archive-sweep.txt:9` lists `slices/001b-ping-guard/logs/red.txt`. Nothing else in the file -mentions it, and `tools/archive_sweep.sh` has no code path for it: - -``` -$ grep -n "red.txt" slices/001b-ping-guard/logs/archive-sweep.txt -9: slices/001b-ping-guard/logs/red.txt # the population list, and nowhere else -$ grep -n "red" tools/archive_sweep.sh -70: … "Checked instead …" 106: … "redirected, unfiltered." # substring hits only -``` - -Counted against the population it derives: - -``` -enumerated in the population 19 -verdict lines (" => ") 9 -AUTHORED lines 8 -self section 1 ( archive-sweep.txt: described, no verdict ) - -- - 18 of 19 accounted for; red.txt is the missing one -``` - -**Observed:** a derived population of nineteen, eighteen classified, one falling through with no -output at all and nothing in the file that surfaces the gap. **Expected:** the script's own -premise, stated in its header at `tools/archive_sweep.sh:7-8` — "fixing one archive per round met -the next one three rounds running. **A list is not a population.**" - -**And it is a regression.** Round 4's sweep did cover it: - -``` -$ git show 76452890…:slices/001b-ping-guard/logs/archive-sweep.txt | grep -n "red.txt" -11:red.txt -39:--- red.txt: the round-1 red. Not reproducible from this tree (lib is fixed); -40: captured by 'mix test ... 2>&1 | tee', tee filters nothing. Full failure blocks present: -41: stacktrace lines: 2 -``` - -The rewrite that fixed four real defects dropped the one file that most needs prose rather than a -diff — the round-1 red, which cannot be regenerated from a tree whose `lib/` is fixed and which -is therefore the only archive whose acquittal has to rest on internal marks. Round 4 gave it -those marks. Round 5 gives it nothing. - -This is blocking on the same standard as round 4's, and I want the consistency on the record: -the objection then was that the instrument did not do what the record said it did. It is the same -objection. The failure mode here is the one `CONVENTIONS.md:20-37` singles out — it fails -**quietly**: the population line is present, the verdict is absent, and there is no tally at the -end that would make the arithmetic visible. Adding that tally (`19 enumerated, 19 classified`) -both fixes this and makes the class impossible to reintroduce; it is the same closing-count -suggestion from my round-4 report, and this finding is its second consequence. - ---- - -## Finding 2 — non-blocking. The fifth count, and it is off by the same file - -You asked whether there is a fifth. There is, at `REVIEW.md:205`: - -> Tracking the probe closes r1's finding 6 rather than only recording it: **all five run-logs are -> regenerable from the tree.** - -The phrase "five run-logs" is mine, from `logs/round3.r1.md:204`: - -> So of the five run-logs, **four can be regenerated** by anyone with the tree **and one cannot**. - -My five were `full-suite`, `green-negotiation`, `gate`, `probe-after` and `red`; the one that -cannot was `red.txt`. Tracking `tools/probe_ping.exs` moved `probe-after.txt` from the second -group to the first — four of five, not five of five. `red.txt` is still not regenerable from this -tree, and the round-4 sweep said so in as many words: - -``` -red.txt -> 12 tests, 2 failures # the pre-fix red -$ grep -c "case version do" lib/beam_mcp/server.ex -> 1 # the fixed clause is present -green-negotiation.txt -> 15 tests, 0 failures # what this tree actually produces -``` - -Regenerating `red.txt` needs `lib/beam_mcp/server.ex` reverted to `base/main`. So the sentence -takes a five-member set whose defining feature was that one member is not regenerable and asserts -that all five are. Fifth in the family, and it lands on the same file as finding 1 — which is not -a coincidence: `red.txt` is the one archive that does not fit the pattern the record has been -built around, and both errors are that pattern being applied to it anyway. - ---- - -## Finding 3 — note. An empty diff is indistinguishable, on the page, from a diff that never ran - -`tools/archive_sweep.sh:41-42` (and `:46-47`, `:51-52`, `:57-58`) run `diff`, then print the -verdict with the note "(empty diff above = identical modulo seed/timing)". When the files match, -`diff` prints nothing, so what a reader sees between the heading and the verdict is **blank**. - -Delete the `diff` line from the script and keep `rc=0`, and the artifact is byte-identical. The -reader cannot tell the two apart from the file. I can, because I re-ran the script — but the file -exists precisely so that a reader does not have to trust a claim, and on this point it still asks -them to. That is a milder form of the same thing r2's round-4 finding 3 called the shape of -evidence rather than evidence. - -Cheap fix in keeping with the rest of the script: print the comparison's own result positively — -`diff … | sed 's/^/ /'` followed by `printf ' (%s differing lines, diff exit=%s)\n'`. Then -a diff that did not run cannot render as a pass. - ---- - -## Finding 4 — note. It describes itself but does not classify itself, and the self section is the one bare assertion left - -Your question: does the script classify itself? It does not. `archive-sweep.txt:2` puts -`archive-sweep.txt` in the population; `:89-92` gives it a section that issues no verdict and -shows no comparison: - -``` -=== archive-sweep.txt itself === - This file is the output of ./tools/archive_sweep.sh, redirected, unfiltered. - Its headings are the script's own echoes -- that is what the script prints -- - and every verdict above is preceded by the diff or the counts it rests on. -``` - -Three assertions, no evidence beneath any of them — inside the file whose header -(`tools/archive_sweep.sh:8-11`) says a sweep "must not assert its own verdicts in an echo". A -self-diff is genuinely impossible in-process, so the honest move is not to assert the conclusion -but to **name the check**: print `sha256sum tools/archive_sweep.sh` and the exact command from the -header, so a reader can do what I did. As it stands the claim is true — I proved it — and it is -true on my authority and not on the file's. - -(The third assertion in that block is also now false in one respect: "every verdict above is -preceded by the diff or the counts it rests on" is right for the two mutation logs, whose counts -are printed, and is finding 3 for the four diff-based verdicts.) - ---- - -## Finding 5 — note. Two verdicts depend on build warmth, and only the third one says so - -The `probe-after.txt` section carries an excellent warning (`archive-sweep.txt:43-47`) that a cold -`_build` changes the comparison. `full-suite.txt` and `green-negotiation.txt` have exactly the -same sensitivity and carry no such note. Demonstrated — I ran the tracked script on a copy whose -`_build/test` was cold: - -``` -1,2d0 -< Compiling 5 files (.ex) -< Generated beam_mcp app - => full-suite.txt DIFFERS (empty diff above = identical modulo seed/timing) -``` - -A false `DIFFERS`, and a verdict line reading `DIFFERS` immediately after a note saying "empty -diff above". Warming `MIX_ENV=test` made the whole run byte-identical to the tracked file. This is -fail-**safe** — it over-reports, never under-reports — which is why it is a note and not more. -But the command in the script header does not reproduce the tracked output on a clean checkout, -and the script's `norm()` already normalises seed and timing; extending it to drop the -compile lines, or stating the warm-build precondition in the header, closes it. - ---- - -## Verified and closed - -- **Round-4 blocking, all four points.** (a) zero `DIFFERS`; `probe-after.txt` now reads - `RAW (byte-identical to a warm run)`. (b) `tools/archive_sweep.sh` is tracked, mode `100755`, - SPDX-headered, with its exact command line at `:13`. (c) the three `spec-*.md` are reclassified - as captures and re-fetched and diffed against upstream — I reproduced all three live; the two - mutation logs now print the counts their verdict rests on (`seed banner : 1`, `stacktrace: : 1`, - `code: : 1`, `Finished in : 1`, `15 tests, 1 failure`). (d) the hand addition is gone; - enumeration is `git ls-files` alone, and it matches mine exactly. -- **Round-4 finding 2, the fourth count.** Corrected in both places to "**all five** indented - lines of the failure block (the `1) test …` header survived)". That is what I measured: header - plus five indented lines in a raw capture, zero indented lines kept. -- **r2's round-4 finding 1**, the direction of the `probe-after.txt` difference. `REVIEW.md` - now says *fewer*, and the reasoning it gives is the right one and is the best paragraph in the - round: fewer-lines-than-the-run is the signature of filtering, so it can never be an acquittal - on its own; what acquits the file is the byte-identical warm-run match. The sweep prints that - reasoning itself at `:43-47` rather than leaving it in prose. -- **Gate:** six `pass` lines, `19 commentable files`, `gate exit=0`; the tracked `gate.txt` says - 19 and the sweep's byte diff against a fresh capture is empty. The count moved 18 → 19 for the - right reason — `tools/archive_sweep.sh` is a tracked, SPDX-headed `.sh`. -- **`logs/round4.r1.md`** as tracked is byte-identical to the bytes I wrote. - ---- - -## Summary - -The instrument is now a real instrument. It is tracked, it names its own command, it derives its -population, it re-fetches the three files whose source lives outside the tree, and its output -reproduces byte-for-byte from a fresh run in an isolated copy — which is how I checked it rather -than by reading it. Every one of my round-4 points is closed, and the fourth hand-written count is -corrected accurately. - -One blocking item: the rewrite lost `red.txt`. It is enumerated in the population and classified -nowhere — nineteen in, eighteen out — and round 4's sweep did cover it. It fails quietly, which is -the class the project's own conventions single out, and the closing tally that would have caught -it is the same one I suggested last round. - -And the fifth count, which lands on the same file: `REVIEW.md:205` says all five run-logs are -regenerable, from a five-member set defined in my round-3 report by the fact that one of them — -`red.txt` — is not. - -VERDICT: changes required diff --git a/slices/001b-ping-guard/logs/round5.r2.md b/slices/001b-ping-guard/logs/round5.r2.md deleted file mode 100644 index 9d408795..00000000 --- a/slices/001b-ping-guard/logs/round5.r2.md +++ /dev/null @@ -1,157 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 5, security, contract and evidence integrity -Type: Report - -**Tree read:** `de326400ca2ccb7bcf97d0a830e8725dbae7da31` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review5 && git write-tree -de326400ca2ccb7bcf97d0a830e8725dbae7da31 -``` -Written to `logs-r2.tree` there. Matches the hash you named. - -**`lib/` and `test/` byte-identical to `867f28ce` — confirmed:** `git diff 867f28ce…de326400 -- lib test | wc -l` → `0`. - -I reviewed the instrument by running it, not by reading it. - ---- - -## My three findings are fixed, and finding 1 is fixed better than I asked - -Taking them in order, because the answer to "does the instrument now support every verdict it states" is *nearly*, and the near-misses are the findings below. - -**Finding 1, the inverted direction.** `REVIEW.md` now carries the byte-identical-to-a-warm-run verdict and states that fewer-lines-than-the-run is the signature of filtering and never an acquittal on its own. `tools/archive_sweep.sh:59-63` prints that reasoning itself, so it survives in the instrument and not only in prose. That is the fix I wanted and one step past it. - -**Finding 2, the spec pages.** Reclassified as captures, and the script genuinely re-fetches and diffs all three (`:88-98`). My own run of the script reproduced all three `RAW` verdicts against live upstream. The rationale printed at `:85-87` — that these are the only three files whose source lives outside the tree, so they are the only ones checkable against an independent authority — is the right reason and is now in the file. - -**Finding 3, verdicts echoed rather than shown.** Fixed at the level I meant: `norm()` is a tracked, readable four-substitution `sed` (`:20`), it is named at each use, and each verdict is preceded by the diff it rests on. That an empty diff prints nothing is inherent to `diff` and the notes say so. - -**Finding 4, the mutation entry.** Named entries, explicit verdicts, and — the part I did not ask for and would have accepted less than — a plain statement that the script does *not* re-run them and why (`:69-71`: it would need a mutated `lib/` in the working tree). Saying what an instrument cannot check is worth more than a verdict it cannot support. - -**And I verified the self-referential claim.** `archive-sweep.txt:89-92` asserts that the file is the script's own redirected output. That is the one claim the sweep cannot check about itself, so I checked it: - -``` -$ ./tools/archive_sweep.sh > sweep5.out 2>&1 ; diff sweep5.out logs/archive-sweep.txt -32,35c32 -< 1,2d0 -< < Compiling 5 files (.ex) -< < Generated beam_mcp app -< => full-suite.txt DIFFERS (empty diff above = identical modulo seed/timing) ---- -> => full-suite.txt RAW (empty diff above = identical modulo seed/timing) -``` -Ninety of ninety-two lines reproduce exactly, including all three live re-fetches, both mutation entries, `gate.txt`, and `probe-after.txt`. The file is the script's output. The one divergence is finding 2 below, and it is the script's, not the archive's. - ---- - -## Findings - -### 1. `red.txt` is in the population and receives no verdict — **blocking** - -`slices/001b-ping-guard/logs/archive-sweep.txt:9`; `tools/archive_sweep.sh:5`. - -**Observed** — the script's own header states its purpose: "Classify **every** file the slice record labels an archive: is it its command's bytes, or not?" The population it derives lists `slices/001b-ping-guard/logs/red.txt` at line 9 of the output. It is then classified nowhere. It is not a `CAPTURES` entry, not an `AUTHORED` entry, and has no verdict line: - -``` -$ grep -n 'red.txt' logs/archive-sweep.txt tools/archive_sweep.sh -logs/archive-sweep.txt:9: slices/001b-ping-guard/logs/red.txt -``` -One hit, in the population listing. The script never mentions the file at all. The round-4 sweep *did* carry a `red.txt` section (`archive-sweep.txt:39-42` at `76452890`) — it stated that the file is not reproducible from this tree because `lib/` is fixed, that `tee` filters nothing, and it counted the failure-block lines present. Round 5 dropped it while rewriting the sweep into a script. - -**Expected** — `red.txt` is labelled an archive by the record it is evidence for: `FINDINGS.md:76` says "Full output: `logs/red.txt`, written by the command." It is the red half of red-before-green — the single artifact establishing that the two new tests failed before the fix — so it is not a peripheral entry. - -I am calling this blocking, and the governing text is this project's own, not a preference of mine. `CONVENTIONS.md:20-37`: a probe whose population omits what the mechanism covers "proves nothing, and it proves nothing **quietly**: the step reports `pass`." That is exactly the shape here. "Zero `DIFFERS` in the current output" is true and is not the same statement as "every file was checked": one file in the enumerated population has no verdict, and an unclassified file is not a `RAW` file. A reader scanning for `DIFFERS` gets a clean bill over a population the instrument did not finish. The whole reason this round exists is that a list is not a population; an enumerated population with an unclassified member is the same defect wearing the fix's clothes. - -The fix is small and round 4 already contained it: restore the `red.txt` entry with its verdict and its stated reason for not being re-runnable, the way `:69-71` does for the mutation logs. That pattern is already in the script. - -### 2. The sweep emits a false `DIFFERS` on a cold `_build`, under a note asserting the opposite — non-blocking - -`tools/archive_sweep.sh:20`, `:22-25`, `:40-42`. - -**Observed** — my run above. `mix test` on a cold `_build/test` emits `Compiling 5 files (.ex)` / `Generated beam_mcp app`; `norm()` normalises the seed and the timings and nothing else, so those two lines survive into the comparison and `full-suite.txt` is scored `DIFFERS`. Nothing about the archive changed — only whether the author's `_build` happened to be warm. - -Two distinct defects, and the second is the one that belongs to this family: - -- **`verdict()` takes one note and prints it on both branches** (`:22-25`), so the failing line reads - `=> full-suite.txt DIFFERS (empty diff above = identical modulo seed/timing)` — a parenthetical - asserting an empty diff, printed directly beneath a non-empty diff, and asserting "identical" - beneath a verdict of `DIFFERS`. That is a printed claim the run did not compute, which is the - defect the instrument exists to catch, inside the instrument. -- **The comparison is order- and state-dependent and does not say so.** `probe-after.txt` passes - only because `./tools/gate.sh` at `:50` runs `mix compile --force` in `dev` and warms the build - before `mix run` at `:56`. My run confirms it: `probe-after.txt` came out `RAW` and only the - *first* `mix test` — `full-suite.txt` — hit a cold build, with `green-negotiation.txt` passing - afterwards on the now-warm one. The ordering is load-bearing and undocumented in a script that - is now tracked and reusable. - -The consequence for the record is narrow but real: "Zero `DIFFERS` in the current output" is a property of the machine the sweep last ran on, not of the tree. Either normalise the compile prologue the way seed and timing are normalised — and say so at the point of use, as the script already does well — or warm the build explicitly before the first comparison and state that it does. - -### 3. The mutation predicate cannot detect instance #2's defect — non-blocking - -`tools/archive_sweep.sh:72-81`. - -**Observed** — the block prints four counts, including `seed banner`. The verdict gate at `:77` tests only two of them: - -```bash -if [ "$(grep -c 'stacktrace:' "$f")" -ge 1 ] && [ "$(grep -c 'Finished in' "$f")" -ge 1 ] -``` -The seed banner is printed and not tested. I probed it by constructing the defect: - -``` -$ grep -v 'Running ExUnit with seed' mutation-a.txt > mutA_filtered.txt -original lines=16 filtered lines=15 - ---- mutation-a.txt seed banner: 1 stacktrace:: 1 Finished in: 1 => RAW ---- mutA_filtered.txt seed banner: 0 stacktrace:: 1 Finished in: 1 => RAW -``` -A mutation log stripped of its ExUnit banner — **instance #2, exactly** — still scores `RAW`. The only automated check the instrument applies to the two mutation logs is blind to the first defect in the family, and catches it only if a human notices a printed `0`. `:70-71` says these files are checked "for the marks a filtered capture cannot have"; the banner is one of the marks it names, and it is not one of the marks it enforces. Add `seed banner` and `code:` to the condition — the counts are already computed on the line above. - -### 4. "Four fresh counts … none by me" omits that one of the four was mine — non-blocking - -`slices/001b-ping-guard/FINDINGS.md`, the new paragraph closing "That is four fresh counts across five rounds, every one of them caught by a lane and none by me." - -**Observed** — true of who *caught* them. Not the whole story of who *wrote* the fourth. The "four of five" figure originated in my own round-3 report: - -``` -$ grep -n 'four of the five' logs/round3.r2.md -96: … and — the part that matters most — four of the five lines of the failure block. -``` -I miscounted, in the finding I made blocking, in the sentence explaining why it was blocking. You adopted the figure into `FINDINGS.md` and the instance table, and r1 caught it in round 4. So the fourth hand-written count entered the record from a reviewer report and was taken on trust. - -That is worth a clause, because it sharpens the lesson the paragraph is already drawing. The paragraph says a typed count is indistinguishable from a derived one on the page. The stronger version is that this holds regardless of *whose* page it was on: a number in a lane's report is not derived either, and folding a reviewer's figure into the record without re-deriving it is how this one survived two rounds. I am raising it against myself and I would rather the record said so. - ---- - -## What I verified and found correct - -**The record's account of my round-4 report is accurate and does not overstate it.** `REVIEW.md` attributes finding 3 to me in my own terms ("the shape of evidence rather than evidence"), attributes finding 1 correctly and adopts the "signature of filtering" framing without inflating it into something I did not claim, and does not represent my round-4 approve as carrying the round. Your opening — that a split is not a pass and that you did not treat my approve as carrying r1's blocking finding — is the rule stated in `REVIEW.md` and followed. **`logs/round4.r2.md` in the tree is byte-identical to the bytes I wrote**; I checked, since I am the only party who can. - -**The four-vs-five correction is right, and I confirmed the measurement from both ends.** The raw failure block is the `1) test …` header plus five indented lines — path, assertion message, `code:`, `stacktrace:`, stacktrace path. The deleted `mutation.txt` kept the header and none of the five: - -``` -$ git show 7772c2a8:…/logs/mutation.txt | sed -n '5p' - 1) test state threads through both era branches shutdown declaring 2025-11-25 … (BeamMCP.NegotiationTest) -$ sed -n '/^ 1)/,/^$/p' logs/mutation-a.txt | wc -l → header + 5 indented lines -``` -All five, not four. r1 is right and I was wrong. - -**Everything else in the sweep holds under my own run.** Population derived from `git ls-files` and matching the tracked set; all three spec pages re-fetched live and identical; `gate.txt` byte-identical, `reuse pass (19 commentable files)` — the sweep script is itself tracked with an SPDX header and its own command line at `:13`, so it entered the REUSE population it is adjacent to, which is the right outcome. `probe-after.txt` `RAW` against a warm run. Both mutation logs carry the banner, the complete failure body and `Finished in`, which I verified independently in round 4 by raw re-run. - ---- - -## Summary and verdict - -The instrument is a real instrument now: tracked, readable, self-documenting about its normalisation, honest about what it declines to re-run, and it reproduced under my hand. My three round-4 findings are closed, one of them past what I asked for. - -It does not yet support every verdict it states. It leaves `red.txt` enumerated and unclassified while reading as a clean sweep, which is the "proves nothing quietly" shape this project has already written down; it flips a verdict on build state and prints a note contradicting that verdict when it does; and the predicate guarding the two mutation logs is blind to the first defect in the family it was built for. The first of those is why this is not an approve. All three are small, and the third is one line. - -I am not softening finding 1 because the round-4 sweep already had the `red.txt` entry and the round-5 rewrite dropped it. A regression in coverage inside the round that promised the population is exactly the thing I would be embarrassed to have waved through. - -**VERDICT: changes required** diff --git a/slices/001b-ping-guard/logs/round6.r1.md b/slices/001b-ping-guard/logs/round6.r1.md deleted file mode 100644 index 81737636..00000000 --- a/slices/001b-ping-guard/logs/round6.r1.md +++ /dev/null @@ -1,245 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 6, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review6 && git write-tree -d9b0c01e7cd61966401b4c7d971216b073578cb9 -``` - -Matches; `git status --short` clean. Written to `001b-review6/logs-r1.tree`. - -**`lib/` and `test/` still byte-identical to `867f28ce`** — subtree hashes -`13a26a2a1462a424f31fa2f7c04b208d9ad27ceb` and `a3bacd2b33321c83126ccf20fc31a6990f74a693` at -both trees. - -Everything below is measured. I ran seven attacks against the instrument in a copy created empty -and verified empty (`0 entries`), populated by `git archive` from this index, `git init` + -`git add -A` so `git ls-files` sees the same population (verified: populations diff empty). Every -mutation asserted its match count before and after. - ---- - -## The cold-build retest you asked for, and then harder - -``` -$ rm -rf _build/test && ./tools/archive_sweep.sh > /tmp/sweep-cold.txt 2>&1 # exit=0 -$ diff /tmp/sweep-cold.txt slices/001b-ping-guard/logs/archive-sweep.txt - BYTE-IDENTICAL FROM A COLD BUILD — the round-5 false DIFFERS does not reproduce - -$ rm -rf _build && ./tools/archive_sweep.sh > /tmp/sweep-icecold.txt 2>&1 # exit=0 -$ diff /tmp/sweep-icecold.txt slices/001b-ping-guard/logs/archive-sweep.txt - BYTE-IDENTICAL FROM A TOTALLY COLD TREE -``` - -Round-5 finding 5 is closed by the exact test that found it and by a harsher one. The tracked -output now reproduces from a tree with no `_build` at all, which is more than "usually right" — -it is the header's command working on a clean checkout, which is what you claimed. - ---- - -## Finding 1 — non-blocking. A `DIFFERS` does not fail the script; only an unclassified file does - -The tally exits 1 on imbalance, so exit status is deliberately meaningful here. It is meaningful -for **completeness** and not for **correctness**. Demonstrated twice, by planting the exact -signature of instance #2 and then a subtler one: - -``` -ATTACK 6: strip the ExUnit banner from red.txt - banner lines before = 1 ; after = 0 - => red.txt DIFFERS (a mark is missing; a filtered capture would look like this) - EXIT=0 - -ATTACK 7: strip only the 'code:' lines - 'code:' lines before = 2 ; after = 0 - => red.txt DIFFERS - EXIT=0 -``` - -A filtered archive — the single thing this instrument exists to detect — is reported loudly in -the verdict column and the script still exits 0. `CONVENTIONS.md:36` says "read the step's line, -not just the exit code"; `tools/gate.sh` in this same repo sets `fail=1` on any failing step and -this script does not. Today the output is read by a human and the column is loud, so this is not -live-false and I am not blocking on it. **If it is ever wired into `gate.sh` or CI it becomes -blocking**, because a filtered archive would go green. Two lines: count `DIFFERS` in `verdict()` -and fold it into the final exit. - -## Finding 2 — non-blocking. The tally compares counts, not sets, and I fooled it - -`tools/archive_sweep.sh:188-197` computes `ENUM` and `CLASSIFIED + AUTH` and compares the two -integers, then prints a **set** claim: "every enumerated file is classified." Two independent -slips at once cancel: - -``` -ATTACK 2: red.txt loses its verdict, and gate.txt is classified twice - drop pattern before = 1 ; dup anchor before = 1 - drop remaining = 0 ; dup anchor now = 2 (both asserted applied) - - enumerated : 21 - classified : 21 (11 verdicts + 10 authored lane reports) - => TALLY BALANCES: every enumerated file is classified. - MUTANT_EXIT=0 - - $ grep -c '=> red.txt' -> 0 # unclassified - $ grep -c '=> gate.txt' -> 2 # counted twice -``` - -The round-5 regression passes the structural fix built to catch it, and the sentence the fix -prints is false at the moment it prints it. This is latent — the shipped tally is true, all -twenty-one are distinct, and I verified that — so it is not blocking on the standard I have held -(a live false statement blocks; a latent one does not). But it is the same shape as the family: -a check whose output is a stronger claim than its computation. - -The fix is small and makes the claim match the computation: have `verdict()` append its filename -to a list, and at the end `comm -23 <(git ls-files … | xargs -n1 basename | sort) <(printf '%s\n' -"${CLASSIFIED_FILES[@]}" | sort)` — then the failure message can name the file instead of -counting it. - -**The tally does work against the single-slip case**, which is what it was built for. I verified -your mutation independently rather than taking it: - -``` -ATTACK 1 (yours): remove the red.txt verdict - enumerated : 21 / classified : 20 => TALLY FAILS: 1 enumerated file(s) unclassified. - MUTANT_EXIT=1 - -ATTACK 3 (mine): a new unclassified capture appears in logs/ - => TALLY FAILS: 1 enumerated file(s) unclassified. EXIT=1 -``` - -Both correct. And new lane reports are absorbed automatically, because `AUTH` globs `round*.md` — -so `round6.r*.md` will not spuriously fail it. - -## Finding 3 — non-blocking. The count of counts is itself a stale hand-written count - -You asked whether there is a sixth. It is the sentence that counts the previous five. - -`FINDINGS.md:346`: "That is **four** fresh counts across five rounds, every one caught by a lane -and none by me." - -There are five. The fifth is "all five run-logs are regenerable from the tree" — my round-5 -finding 2 — and **this round corrects it** at `REVIEW.md:207` ("Round 5 said 'all five', wrong by -one"). It is not added to the running total, and it does not appear in `FINDINGS.md` at all: - -``` -$ grep -n "run-log\|all five" FINDINGS.md -202, 329, 341: … all three are the "all five indented lines" fix, a different figure - -> the round-5 run-logs count is NOT RECORDED in FINDINGS -$ grep -n "four fresh" FINDINGS.md -346:That is four fresh counts across five rounds … -``` - -And the tree already contains the correct ordinal, in a file tracked three directories away: -`logs/round5.r1.md` heads that finding "**The fifth count**, and it is off by the same file". So -the record now disagrees with itself inside one commit — the total says four, the lane report says -fifth, and `REVIEW.md` corrects the fifth without incrementing the total. - -The paragraph this sits in is the one arguing that "a count typed rather than derived is -indistinguishable from a derived one on the page." It is, and this is the demonstration. Also -"across five rounds" is now six. - -## Finding 4 — note. The self entry names a real check and then prints a verdict nothing computed - -`tools/archive_sweep.sh:179` is `verdict archive-sweep.txt 0 "(self: named check above, not an -assertion)"` — a hard-coded pass. Of the eleven `RAW` lines in the output, ten have a computation -above them and this one does not, and its parenthetical says "not an assertion" from inside the -verdict column, which is where the assertion is. - -**The named check itself is genuine and I verified it**, which is the substance of round-5 -finding 4: - -``` -printed script sha256 : de9747241aa99b48a936e79c232edbac91f18e824b94ecf025353be45b5bcb54 -actual sha256 : de9747241aa99b48a936e79c232edbac91f18e824b94ecf025353be45b5bcb54 -``` - -The fix is a third state rather than a third check: print `SELF` (or `NAMED`) instead of `RAW`, -still counted by the tally. Then `grep '=> .*RAW'` returns only files something compared. - -## Finding 5 — note. `showdiff` reports a pass over two empty inputs - -``` -ATTACK 4: showdiff /tmp/empty1 /tmp/empty2 - comparison: 0 differing line(s), diff exit=0 - rc=0 -> verdict() would print RAW -``` - -Not reachable in this script today — `mix test` always emits output and no archive is empty, and -a one-sided empty is caught because the other side's content shows as a diff. But `showdiff` is -the helper every diff-based verdict routes through, and it has no non-emptiness guard. This is -the "reported IDENTICAL over two empty lists" defect that `CLAUDE.md` §4b records as one of the -three probe failures that motivated the run-against-a-copy rule. One line: refuse, loudly, when -either input is empty. - -## Finding 6 — note. The offline path is written as tolerated and is dead-ended - -``` -ATTACK 5: point the three spec URLs at an unresolvable host (3 occurrences asserted, 3 replaced) - => spec-basic-versioning.md UNCHECKED (fetch failed; offline) - => spec-changelog.md UNCHECKED (fetch failed; offline) - => spec-legacy-basic.md UNCHECKED (fetch failed; offline) - enumerated : 21 / classified : 18 => TALLY FAILS: 3 enumerated file(s) unclassified. - EXIT=1 -``` - -`fetch_check` has a graceful branch that prints `UNCHECKED (fetch failed; offline)` and does not -call `verdict`, so the tally then reports a coverage gap and fails. **The direction is right** — -an unchecked file is genuinely not a classified one, and I would not want it counted. But the -UNCHECKED branch reads as a tolerated outcome and is not one, and "3 enumerated file(s) -unclassified" mis-describes "the network was down". A sentence at the tally distinguishing -*unclassified* from *unreachable* costs nothing and stops a reader diagnosing a coverage bug. - ---- - -## Verified and closed — round 5, all five - -- **Finding 1, `red.txt`.** Restored at `archive-sweep.txt:59-75` with a verdict, and with the - reason it cannot be re-run stated rather than implied. `marks()` now **enforces** all four - marks instead of testing two, which was r2's round-5 finding 3 — and I scored that rather than - reading it: stripping the ExUnit banner (attacks 6) and stripping only the `code:` lines - (attack 7) each flip the verdict to `DIFFERS`. The check has teeth. -- **Finding 2, the fifth count.** Corrected at `REVIEW.md:202-208`, accurately, with the right - diagnosis — four are regenerable, `red.txt` is not and correctly so. See finding 3 for the - knock-on. -- **Finding 3, empty diff vs diff that never ran.** Every diff-based verdict is now preceded by - `comparison: 0 differing line(s), diff exit=0`. A check that did not execute can no longer - render as a pass. The pass-notes were also reworded to describe what is printed rather than an - absence, and the two-note `verdict()` fixes the "DIFFERS (empty diff above = identical)" - contradiction r2 found. -- **Finding 4, the self section.** Now names its check — script `sha256` plus the one-line - reproduce command — and the hash matches. Substantively closed; see finding 4 for the column. -- **Finding 5, build warmth.** Closed, verified cold and ice-cold, above. `norm()` absorbs the - compile prologue with the reason at the point of use, and the explicit warm-up removes the - undocumented load-bearing ordering r2 found. - -**Gate:** six `pass` lines, `19 commentable files`, `gate exit=0`. -**`logs/round5.r1.md`** as tracked is byte-identical to the bytes I wrote. -**The sweep's own claim about round 5** — "19 listed, 18 classified" — matches what I measured -that round. - ---- - -## Summary - -This is the first round where I find nothing blocking, and I want to be explicit about why I -trust that, given that my round-2 approve was wrong. Round 2 I compared counts. This round I -byte-diffed the instrument's entire output against fresh runs from a cold and an ice-cold tree, -reproduced your tally mutation independently, and ran six more attacks of my own against -`showdiff`, `marks()`, the tally and the offline path. The instrument survived four of the seven -and the three it did not survive are latent, not live: the shipped output's eleven verdicts are -each correct, the tally is truthful, and no archive in the tree is filtered. - -What remains is one behavioural gap I would fix before this script goes anywhere near CI — a -`DIFFERS` does not affect the exit status — one latent false-pass in the tally's count-not-set -comparison, one in `showdiff` over empty inputs, and the sixth-order count: `FINDINGS.md:346` -says four where the tree's own `logs/round5.r1.md` says fifth and `REVIEW.md:207` corrects the -fifth without incrementing the total. - -If r2 weighs the exit-code gap as blocking I would not argue against it; consistency between the -lanes is worth more than my ordinal, and the argument for blocking it is one wiring decision -away from being right. - -VERDICT: approve diff --git a/slices/001b-ping-guard/logs/round6.r2.md b/slices/001b-ping-guard/logs/round6.r2.md deleted file mode 100644 index 6e627901..00000000 --- a/slices/001b-ping-guard/logs/round6.r2.md +++ /dev/null @@ -1,157 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 6, security, contract and evidence integrity -Type: Report - -**Tree read:** `d9b0c01e7cd61966401b4c7d971216b073578cb9` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review6 && git write-tree -d9b0c01e7cd61966401b4c7d971216b073578cb9 -``` -Written to `logs-r2.tree` there. Matches the hash you named. `git diff 867f28ce…d9b0c01e -- lib test | wc -l` → `0`, confirmed myself. - -You asked three questions. Short answers, then the evidence: the tally is honest about **cardinality and silent about identity**, and I broke it; `showdiff`'s counts **cannot be fooled into a pass**; and nothing from the round-5 reports was misrepresented — the account of my finding 4 is better than the sentence I wrote. - ---- - -## My round-5 findings are closed, and finding 2 is closed harder than I asked - -**Finding 1, `red.txt`.** Restored at `tools/archive_sweep.sh:118-133` with a verdict and its stated reason for not being re-runnable — the failing state before the fix, reproducible only by reverting `lib/`, which the script must not do to the working tree. It uses the `marks()` route the mutation logs use, which is the right pattern for the one archive whose acquittal cannot rest on a diff. - -**Finding 2, build-state dependence.** Both defects fixed, and I verified the stronger claim rather than the stated one. The script's header now says its command "reproduces the tracked output on a clean checkout"; I ran it from a copy of the tree with `_build` **entirely absent**: - -``` -$ tar -cf - --exclude=_build . | (cd copy && tar -xf -) ; cd copy -$ ./tools/archive_sweep.sh > sweep6_mut.out 2>&1 -$ diff sweep6_mut.out logs/archive-sweep.txt -75c75 (my mutation's line) -125c125 script sha256 : 3591365e… vs de974724… -``` -Two differing lines from a checkout with no build at all, and both are mine: the line I mutated, and the `script sha256` — which changed the instant I edited the script. That self-report is doing real work, and it is the neatest thing in this round: it makes the sweep's output non-portable across a modified script, so a reader cannot be handed output produced by a different instrument than the one in the tree. Build-state independence is demonstrated, not asserted. `verdict()` at `:38-42` now carries separate pass and fail notes, so a `DIFFERS` can no longer print a parenthetical asserting agreement. - -**Finding 3, the blind predicate.** All four marks enforced at `:65`. I re-ran my own probe against the new `marks()`, copied verbatim from the script, and added two strips you did not name: - -``` -mutation-a.txt banner=1 stack=1 code=1 finished=1 => RAW -mutation-b.txt banner=1 stack=1 code=1 finished=1 => RAW -red.txt banner=1 stack=2 code=2 finished=1 => RAW -mA_nobanner.txt banner=0 stack=1 code=1 finished=1 => DIFFERS <-- caught (instance #2) -mA_nocode.txt banner=1 stack=1 code=0 finished=1 => DIFFERS <-- caught -red_nofinish.txt banner=1 stack=2 code=2 finished=0 => DIFFERS <-- caught -``` -**Finding 4.** `FINDINGS.md:346-359` records that the "four of five" figure came from my round-3 report and that you adopted it on the strength of its source. The conclusion you rewrote — *a count is underived no matter whose page it is on*, and a figure in an adversarial reviewer's report is exactly as unverified as one in yours — is a better lesson than mine and I would not improve it. r1's fifth count in the same family ("all five run-logs are regenerable" when four are, `red.txt` being the correct exception) is fixed at `REVIEW.md:205-211` and correctly named as the same defect: adopting a lane's number while dropping the exception the lane had attached to it. - -**And the sweep reproduces under my hand.** `./tools/archive_sweep.sh` in the review checkout, output diffed against the tracked file: **byte-identical**, exit 0. - ---- - -## Findings - -### 1. The tally counts, it does not match — I made it pass over the exact regression it exists to catch — non-blocking - -`tools/archive_sweep.sh:188-196`. - -**Observed** — the control compares two integers: `ENUM` from `git ls-files`, against `CLASSIFIED` (a counter incremented inside `verdict()`) plus `AUTH`. It never compares *names*. So a verdict pointed at the wrong file balances just as well as one pointed at the right file. I mutated one argument — the filename, nothing else — in a copy with `_build` excluded: - -``` -mutation: verdict red.txt … -> verdict red-typo.txt … -applied: before=1 old_after=0 new_after=1 # asserted applied - => red-typo.txt RAW (banner + code: + stacktrace: + Finished in, all present) - enumerated : 21 - classified : 21 (11 verdicts + 10 authored lane reports) - => TALLY BALANCES: every enumerated file is classified. -MUTANT_EXIT=0 -``` -`red.txt` has no verdict. A file that is not in the population has one. The sweep prints **"every enumerated file is classified"**, exits 0, and reads as a clean sweep. That is the round-5 regression — a file enumerated and unclassified, reading clean — reintroduced quietly, through the control built so it could not be reintroduced quietly. - -**Expected** — the check the sentence claims is a set comparison, not a cardinality comparison: collect the basenames `verdict()` was called with, `comm -3` them against the enumerated basenames, and fail on any name present in one and not the other. That also subsumes the count, removes the need for a separate `AUTH` term, and would have caught my mutant on the first line of its output. - -I am **not** making this blocking, and I want the reasoning on the record because it is the same reasoning I used to refuse to soften a finding in round 3. Under the shipped tree the tally's verdict is true — I checked all twenty-one names against the population by hand and by run, and every one is genuinely classified. The defect is that the control is weaker than the sentence it prints, which is exactly the shape of my round-5 finding 2a (`verdict()` printing a note the run had not computed) and my round-5 finding 3 (a predicate blind to the class it guarded). I called both of those non-blocking. Calling this one blocking because it is the round's centrepiece would be severity by prominence rather than by rule, and I said in round 5 that the standard cannot move between rounds. It cuts this way too. - -It is still the most important finding of the round, and I would fix it before the other three. - -### 2. The structural fix has no record entry and no archived score — non-blocking - -**Observed** — the tally is the headline of round 6. It appears nowhere in the record: - -``` -$ grep -rn 'TALLY FAILS\|MUTANT_EXIT\|tally' slices/001b-ping-guard/FINDINGS.md slices/001b-ping-guard/REVIEW.md -(no output) -$ ls slices/001b-ping-guard/logs/ | grep -i tally -(no output) -``` -No `FINDINGS.md` entry, no `REVIEW.md` entry, no `logs/mutation-tally.txt`. The mutation that scores it — the one that makes it a control rather than an ornament — exists only in your message to me. - -I reproduced it rather than doubting it, from a copy with `_build` excluded: - -``` -mutation: replace the red.txt marks/verdict block with `true` -applied: before=1 old_after=0 new_after=1 - enumerated : 21 - classified : 20 (10 verdicts + 10 authored lane reports) - => TALLY FAILS: 1 enumerated file(s) unclassified. - Unclassified is NOT the same as RAW. Do not read this sweep as clean. -MUTANT_EXIT=1 -``` -Byte-for-byte your numbers. **The substance is sound; only the record is missing.** But this slice's recurring lesson is that a control asserted in conversation and absent from the record is indistinguishable from one that was never scored, and every previous instance in this family was caught because the record said something the bytes did not. Here the record says nothing at all, which is the understating version of the same gap. Given finding 1, the entry should also state what the tally does *not* check. - -### 3. The sweep prints a warm-up command it does not run, and the printed one does the opposite — non-blocking - -`tools/archive_sweep.sh:85` echoes `$ mix compile --force ; mix test --exclude all`. `:88` runs `mix test --exclude test`. Measured, both, in the review checkout: - -``` -$ mix test --exclude test → 0 tests, 0 failures (39 excluded) # what runs -$ mix test --exclude all → 39 tests, 0 failures # what is printed -``` -There is no tag named `all`, so the printed line excludes nothing and runs the whole suite; the line that runs excludes everything, which is what warming wants. The behaviour is right and the instruction is wrong, in the opposite direction — a reader following the sweep's own reproduction line performs a materially different step and gets a two-second warm-up confused with a full test run. It is one word, and it is a printed claim about what ran that is not what ran, inside the instrument built to catch that. - -### 4. The authored half of the tally cannot fail — note - -`AUTH` at `:189` is `git ls-files -- "$L/round*.md" | wc -l`; the AUTHORED loop at `:167` iterates the identical glob. The two agree by construction and no mutation of the classification logic can separate them. So `classified : 21 (11 verdicts + 10 authored lane reports)` reads as two independently-derived halves being reconciled when only the first half carries discriminating power. Worth one clause, because the printed shape currently over-claims what is being cross-checked. Folding the lane reports into the same name-set comparison from finding 1 dissolves this too. - ---- - -## `showdiff` — the answer is no, and here is why - -`tools/archive_sweep.sh:47-53`. The verdict is driven by `rc`, not by the printed count, and the two cannot be separated in the direction that matters: - -- A real difference always emits at least one `<` or `>` line in default `diff` format, so a `rc=1` can never print `0 differing line(s)` from a genuine mismatch. -- The count is only ever an input to the *printed line*, never to `verdict()`, so inflating or deflating it cannot manufacture a `RAW`. -- The one case where the count reads misleadingly is a diff that could not run. I probed it with the function copied verbatim: - -``` ---- both files exist and differ --- - comparison: 2 differing line(s), diff exit=1 rc=1 => DIFFERS ---- second file MISSING --- -diff: …/nope: No such file or directory - comparison: 0 differing line(s), diff exit=2 rc=2 => DIFFERS -``` -`0 differing line(s)` beside `diff exit=2`, and the verdict is still `DIFFERS`. It cannot render as a pass. The only wrinkle is cosmetic: that branch prints the fail-note "(the diff above is the difference)" while the diff's error went to stderr and there is nothing above it — visible in the output file only because the header's command redirects `2>&1`. Not worth a fix; worth knowing. - -The design decision behind `showdiff` — report the comparison **positively**, because "an empty diff and a diff that never ran are indistinguishable on the page" (`:44-46`) — is the correct generalisation of my round-4 finding 3, and it is a better statement of it than I made. - ---- - -## What I verified and found correct - -**Nothing from the round-5 reports is misrepresented.** `FINDINGS.md:346-359` attributes the "four of five" miscount to my report, in my framing, without softening that I made it inside the finding I had made blocking — and then draws the stronger conclusion. `REVIEW.md:205-211` handles r1's fifth count the same way. My round-5 finding 2's two halves are recorded as two, and finding 3 is recorded with the probe rather than the conclusion. **`logs/round5.r2.md` in the tree is byte-identical to the bytes I wrote**; I checked, being the only party who can. - -**Everything the sweep asserts under the shipped tree holds.** Population derived from `git ls-files` and matching the tracked set; twenty-one enumerated, twenty-one genuinely classified by name; all three spec pages re-fetched live and identical; `gate.txt` byte-identical; `probe-after.txt` byte-identical to a warm run; `red.txt`, `mutation-a.txt` and `mutation-b.txt` all carrying the four marks, verified against my own predicate run. `lib/` and `test/` have not moved since `867f28ce` and my behavioural conclusions still rest on bytes I read. - ---- - -## Summary and verdict - -The instance fix was right and the structural fix was the right instinct: a check that cannot fail proves nothing, and you scored it rather than asserting it. It does fail on the mutation you scored — I reproduced that exactly. It does not fail on the mutation you did not score, because it compares two integers where it prints a claim about names, and I got the round-5 regression past it by changing one filename argument. That is worth fixing before this lands, along with giving the control a record entry, because it is currently the only load-bearing thing in the slice that the record does not mention. - -None of the four is an artifact whose bytes are not its command's, none touches `lib/`, `test/`, or any measured result, and every verdict the shipped sweep prints is true of the shipped tree. By the standard I have applied for five rounds that is not a blocking round, and I am not going to promote a finding because it happens to be the interesting one. - -**VERDICT: approve** diff --git a/slices/001b-ping-guard/logs/round7.r1.md b/slices/001b-ping-guard/logs/round7.r1.md deleted file mode 100644 index e761c499..00000000 --- a/slices/001b-ping-guard/logs/round7.r1.md +++ /dev/null @@ -1,225 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 7, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review7 && git write-tree -d96ee6c11b1fff791a61b3eab4c17cd91ae35901 -``` - -Matches; `git status --short` clean. Written to `001b-review7/logs-r1.tree`. - -**`lib/` and `test/` untouched — confirmed two ways.** `git diff a05e018 d96ee6c1 -- lib test` is -empty, and the subtree object hashes are still `13a26a2a1462a424f31fa2f7c04b208d9ad27ceb` (lib) -and `a3bacd2b33321c83126ccf20fc31a6990f74a693` (test) — the same objects as `867f28ce`, the tree -both lanes' `lib/` conclusions rest on. Those conclusions still stand on bytes we read. - -The delta is exactly the declared scope: `mix.exs`, `CHANGELOG.md`, three run-logs, and appended -records in `PLAN.md`, `FINDINGS.md`, `REVIEW.md`. Nothing else moved. - ---- - -## Finding 1 — **BLOCKING.** `README.md:16` still tells users to depend on `~> 0.1` - -```elixir -def deps do - [{:beam_mcp, "~> 0.1"}] -end -``` - -This is the one you asked me to look for — a live artifact that is now wrong — and it survived -your sweep because **the stale string is not `0.1.2`**. A grep for the number that changed cannot -find a version reference written as `0.1`, and that is the whole reason to look for the class -rather than the string. - -**Measured, not recalled.** I did not want to assert Hex requirement semantics from memory, so I -ran Elixir's own `Version` module in the review copy: - -``` - ~> 0.1 0.1.0=true 0.1.2=true 0.2.0=true 1.0.0=false - ~> 0.1.0 0.1.0=true 0.1.2=true 0.2.0=false 1.0.0=false - ~> 0.2 0.1.0=false 0.1.2=false 0.2.0=true 1.0.0=false -``` - -So I want to be precise about what is and is not wrong here, because overstating it would be -worse than missing it: **`~> 0.1` resolves to `0.2.0`. Nothing is broken.** A new user copying -the snippet today installs the right version. - -The defect is the other direction, and it is exactly the thing this release exists to signal. -A consumer who copied that snippet at `0.1.0` and runs `mix deps.update beam_mcp` is carried to -`0.2.0` **with no change to their own requirement and no signal of any kind** — across the break -the `CHANGELOG` opens by telling them to read before upgrading: - -> **Read this before upgrading if any client sends `_meta` naming `2025-11-25`.** A result -> answering such a request no longer carries `resultType` or `_meta` -> `io.modelcontextprotocol/serverInfo`. - -The owner chose a minor bump precisely so that a consumer *can* depend on the old behaviour. The -README hands them a requirement under which they cannot: `~> 0.1` spans both sides of the break, -`~> 0.2` does not. Publishing `0.2.0` with a README recommending `~> 0.1` ships the version -signal and the advice that defeats it in the same release. - -**Why I am blocking on it rather than noting it**, on the standard I have held since round 1: -this is shipped, user-facing documentation that is stale about the change under review. `mix.exs` -puts `README.md` in the Hex package `files:` list and makes it the ex_doc landing page -(`docs: [main: "readme"]`), so after `mix.exs` it is the most-read live artifact in the tree. My -round-1 blocking finding was a moduledoc that described the pre-change behaviour after the -change; this is the same class one file over, and the round's own acceptance question was whether -any live artifact had been left behind. The fix is one character. - -Two things I checked so as not to overstate it: `git grep '~>'` finds no other self-referential -pin, and `mix.exs` derives `@server_version` from `@version` rather than restating it, so no -other live file carries a hard-coded version. - ---- - -## Finding 2 — non-blocking. "Only the live artifacts move" names the wrong set, in both directions - -`FINDINGS.md:434-437`: - -> Only the *live* artifacts move: `mix.exs`, the `CHANGELOG` entry, and the regenerated -> `probe-after.txt`, whose `serverInfo` is read from `mix.exs` at compile time. - -Measured against the delta: - -``` -$ git diff --stat a05e018 d96ee6c1 -- slices/001b-ping-guard/logs/ - full-suite.txt | 4 ++-- <- moved, not named - green-negotiation.txt | 4 ++-- <- moved, not named - probe-after.txt | 4 ++-- <- named -``` - -`full-suite.txt` and `green-negotiation.txt` also moved — new seed, new timing — and neither -contains a version string, so the stated reason ("`serverInfo` is read from `mix.exs`") does not -explain them. And in the other direction, `README.md:16` is a live artifact that did not move and -should have (finding 1). The sentence is a list, and both the omission and the inclusion matter -because the paragraph's job is to justify which files were touched. - -I am not saying re-taking the other two was wrong. Re-taking every run-log when the tree moves is -the correct discipline and is the fix for instance #1 — an archive of a tree that was not being -shipped. It just is not what the record says was done, or why. - -**Related, same paragraph family:** `PLAN.md:222-223` and `REVIEW.md` both give the scope as "the -regenerated `probe-after.txt` **and sweep**". `archive-sweep.txt` is not in the delta. That is the -right outcome and I verified it rather than assuming — re-running the sweep produces byte-identical -bytes because its output carries no version string — so "regenerated" is defensible; but listing -it among the things that changed, while the two logs that did change go unnamed, gets the scope -backwards in both entries. - -## Finding 3 — non-blocking. The sentence under the grep does not describe the grep's output - -`FINDINGS.md:429-433` prints a command and then says what it returns: - -``` - $ grep -rn '0\.1\.2' --include='*.md' . | grep -v _build | grep -v deps/ - -still returns hits in `logs/round*.md` and in this file's own record of rounds 1-6. -``` - -I ran it: - -``` - 8 slices/001b-ping-guard/PLAN.md <- the largest group, not named - 7 slices/001b-ping-guard/logs/round1.r2.md - 7 slices/001b-ping-guard/FINDINGS.md - 1 slices/001b-ping-guard/REVIEW.md <- not named - 1 slices/001b-ping-guard/logs/round4.r2.md - 1 slices/001b-ping-guard/logs/round2.r2.md - 1 slices/001b-ping-guard/logs/round2.r1.md - 1 slices/001b-ping-guard/logs/round1.r1.md -``` - -`PLAN.md` has more hits than any other file and is not in the description; `REVIEW.md` is not -either. Both are legitimate — `PLAN.md`'s eight include the superseded `## Version` section, which -is correctly left as written — so this is a description that under-reports its own output, not a -sweep that missed something. It matters only because the sentence exists to account for every -remaining hit, and it accounts for six of eight files. - ---- - -## The two deliberate non-changes — checked, not assumed - -**The `### Changed` heading reads correctly under a number that now agrees with it, and does not -read as a leftover.** I looked for the failure mode you named and it is closed by the paragraph -directly beneath the heading, which was rewritten: - -> The argument for a patch was available and is rejected: `0.y.z` sits outside semver's -> compatibility contract, and the removed fields were never correct … Neither of those makes the -> wire change smaller. … The minor bump is the honest signal, and the `### Changed` heading above -> stays exactly as it was written when the number still disagreed with it. - -That last clause is what makes the non-change legible: a reader is told the heading predates the -decision and why it stands. The old text argued *for* a patch and would have been flatly wrong at -`0.2.0`; it is inverted, not softened, and `**That is why this is 0.2.0 and not a patch.**` now -sits where the patch rationale used to. The heading is load-bearing, and I agree with keeping it. - -**No archive was wrongly swept.** All six of my reports as tracked are byte-identical to the bytes -I wrote: - -``` -round1.r1.md … round6.r1.md: IDENTICAL to the bytes I wrote (6/6) -``` - -The twelve lane reports and the historical tables keep their `0.1.2` strings, which is right — -I did measure `beam_mcp version: 0.1.2` in round 2, and an archive that is edited to match a later -tree is not an archive. `PLAN.md`'s `## Version` section is superseded by an appended note -immediately below it rather than rewritten, which is the same rule applied correctly. - ---- - -## Verified - -- **`mix.exs`** reads `0.2.0`; `@server_version` is still derived from it, not restated. -- **`probe-after.txt`** reads `beam_mcp version: 0.2.0` and its modern `serverInfo` carries - `"version":"0.2.0"` — both occurrences, not just the banner. -- **The sweep reproduces byte-identically from a tree with no `_build` at all**, in a copy created - empty and verified empty (`0 entries`), `git archive` from this index, `git init` + `git add -A` - so the population matches (verified: populations diff empty): - - sweep exit=0 ; diff vs tracked archive-sweep.txt -> BYTE-IDENTICAL - enumerated : 23 / classified : 23 (11 verdicts + 12 authored lane reports) - => TALLY BALANCES ; zero DIFFERS anywhere in the file - - That is not just a tally check: the sweep diffs `full-suite`, `green-negotiation` and - `probe-after` against fresh runs, so its clean result independently proves all three re-taken - logs match commands run at `0.2.0`. If one had been left at `0.1.2` it would have gone `DIFFERS`. -- **`CHANGELOG` `0.1.1` note** now states the jump in terms — the number was taken on `main`, the - release never happened, the moduledoc fix ships inside `0.2.0`, and the section is kept under its - original heading. A reader comparing Hex to the file no longer has to reconstruct it. -- **No `tools/signoff.sh`.** `git ls-files tools/` returns `archive_sweep.sh`, `gate.sh`, - `probe_ping.exs`. Your `REVIEW.md` correction is accurate: nothing mechanical would have refused - an amendment, and saying so beats implying a control that does not exist. I would rather read - that sentence than the comfortable one. -- **My round-6 finding 3** (the count of counts) was closed better than I proposed: the tally is - **deleted rather than corrected**, on the reasoning that a freshly typed "five across six" would - repeat the defect while fixing it, and no command in the tree derives the number. The instances - stay enumerated in the table where a reader can count them. That is the right answer and it is - not the one I suggested. -- **Gate:** six `pass` lines, `19 commentable files`, `gate exit=0`. - ---- - -## Summary - -The version change itself is correct and the round is properly bounded: `lib/` and `test/` are -byte-identical to the tree both lanes approved, the delta is exactly the declared scope, the three -re-taken logs are proved to match fresh runs at `0.2.0` by a sweep that reproduces byte-for-byte -from a cold tree, and no archive was falsified to make the tree look tidy. The `### Changed` -heading survives as load-bearing rather than as residue, because the paragraph under it now says -why it stands. The `signoff.sh` correction is right and worth having. - -One blocking item, and it is the miss the round was set up to catch: `README.md:16` still says -`{:beam_mcp, "~> 0.1"}`. It resolves — I measured that rather than assuming it — so no build -breaks; what breaks is the signal. A consumer pinned `~> 0.1` at `0.1.0` crosses this release's -documented wire break on a routine `mix deps.update`, with nothing in their own file changing. -The README is in the Hex `files:` list and is the ex_doc landing page, so it is the artifact a -consumer reads before deciding how to depend on the package, and it currently recommends the one -requirement the `0.2.0` decision was made to let them avoid. - -Two smaller record items: `FINDINGS.md:434` names the moved-file set wrongly in both directions, -and `FINDINGS.md:429`'s sentence accounts for six of the eight files its own command returns. - -VERDICT: changes required diff --git a/slices/001b-ping-guard/logs/round7.r2.md b/slices/001b-ping-guard/logs/round7.r2.md deleted file mode 100644 index fdf3fed5..00000000 --- a/slices/001b-ping-guard/logs/round7.r2.md +++ /dev/null @@ -1,150 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 7, security, contract and evidence integrity -Type: Report - -**Tree read:** `d96ee6c11b1fff791a61b3eab4c17cd91ae35901` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review7 && git write-tree -d96ee6c11b1fff791a61b3eab4c17cd91ae35901 -``` -Written to `logs-r2.tree` there. Matches the hash you named. - -``` -$ git diff a05e018 d96ee6c1 -- lib test | wc -l → 0 -$ git diff 867f28ce d96ee6c1 -- lib test | wc -l → 0 -``` -`lib/` and `test/` are untouched by this round and have not moved since round 2. - ---- - -## One blocking finding, and it is in the paragraph this round exists to rewrite - -### 1. `CHANGELOG.md:33` states the wire behaviour change backwards — **blocking** - -**Observed** — the rewritten rationale reads: - -> For a published package the JSON *is* the API, **a method that answered now refuses for a client declaring `2025-11-25`**, and a consumer can depend on both. - -Measured. I enumerated every method for a client declaring `2025-11-25`, on this tree and on a copy of `base/main` — whose `_meta` clause is byte-identical to the `v0.1.0` tag, as I verified in round 3: - -``` -$ mix run /probe_methods.exs -########## AFTER (round-7 tree, 0.2.0) ########## - server/discover answered initialize answered - notifications/initialized no reply ping answered - tools/list answered tools/call answered - shutdown answered exit no reply - nosuch REFUSED -32601 -########## BEFORE (base/main clause == published 0.1.0) ########## - server/discover answered initialize answered - notifications/initialized no reply ping REFUSED -32601 - tools/list answered tools/call answered - shutdown answered exit no reply - nosuch REFUSED -32601 -``` -**Exactly one method changed status for such a client: `ping`, and it went REFUSED → answered. Zero methods went answered → refused.** The sentence asserts the opposite direction of the only method-level change in the release. - -**Why this is blocking and not a wording note.** Three reasons, and the third is the one that decides it. - -1. It is a false statement about wire behaviour in the **live, published-facing** document of a package that is on Hex. It is the paragraph a consumer reads to decide whether to upgrade, and it tells them to expect a method to start refusing. None does. -2. It was introduced **this round**, in scope item 2, in the sentence rewritten precisely because the previous rationale had become wrong. The replacement is wrong in a different way. -3. It **mis-supports the conclusion it is offered for.** A refusal becoming an answer is additive — it is the least breaking thing in the release and cannot be an argument for a minor bump. The genuinely breaking-shaped change is the field removal, which the paragraph above it describes correctly and which is the whole case. So the sentence both states a fact that is not true and weakens the argument it was added to strengthen. "and a consumer can depend on both" then inherits the error. - -The corrected clause is stronger than the wrong one, and it is the argument I made in round 2: *a method that refused now answers, and results on that path have lost two fields; a consumer could have depended on either.* That is accurate, and both halves are real changes a `0.1.0` consumer can observe. - -I want to be explicit that this is not me relitigating the number. The number is right and it is the owner's; I said in round 2 I would not resolve it and I am not resolving it now. This is the description, which is the thing I did insist on. - ---- - -## The two deliberate non-changes, checked rather than assumed - -**The `### Changed` heading still reads correctly, and it is not a leftover.** It reads "two fields are REMOVED from results for legacy-declared requests" — that is a *description of the change*, not an argument about a number. It never said "and therefore patch" or "and therefore minor"; it said what happens on the wire. A description does not go stale when the label above it moves, which is precisely why it survives. Keeping it is right, and `FINDINGS.md:407-418` states the reason well: the accurate description is what let someone with authority over the label pick it well. If it had been written as an argument for a version it would now be a leftover; it was not, so it is not. - -**No archive has been falsified.** I checked the direction that matters most to me, since I am the only party who can certify it: - -``` -round1.r2.md IDENTICAL round2.r2.md IDENTICAL round3.r2.md IDENTICAL -round4.r2.md IDENTICAL round5.r2.md IDENTICAL round6.r2.md IDENTICAL -``` -All six of my lane reports are byte-identical to the bytes I wrote, `0.1.2` strings and all. The reports that measured `beam_mcp version: 0.1.2` still say so. That is correct and it is the harder half of the rule to follow. - -**And no live artifact carries a stale version.** I swept both directions rather than trusting the classification: - -``` -$ git ls-files -z | xargs -0 grep -c '0\.1\.2' | grep -v ':0$' - PLAN.md:8 round1.r2.md:7 FINDINGS.md:7 REVIEW.md:1 - round4.r2.md:1 round2.r2.md:1 round2.r1.md:1 round1.r1.md:1 -``` -Zero in `CHANGELOG.md`, `README.md`, `mix.exs`, `lib/`, `test/`, `tools/`. `mix.exs:7` reads `@version "0.2.0"`. The `PLAN.md` hits are the original In-scope and Version sections, which `PLAN.md:213` supersedes in place — "The Version section above specifies `0.1.2` and is left exactly as written" — the corrections-are-appended rule applied literally and correctly. The `REVIEW.md` hit is the round-7 decision line itself. One `FINDINGS.md` hit needs a line and is finding 3 below; the rest are historical table rows. - ---- - -## Findings 2 and 3 - -### 2. `REVIEW.md:10` says `tools/` contains one file; it contains three — non-blocking - -**Observed** — the opening section reads "``tools/`` contains `gate.sh` **and nothing else**." - -``` -$ git ls-files tools/ -tools/archive_sweep.sh -tools/gate.sh -tools/probe_ping.exs -``` -False since round 4 (`probe_ping.exs`) and round 5 (`archive_sweep.sh`) — both added on lane findings. - -**Why it is worth a finding rather than a shrug.** You asked me to check the signoff statement, and this is that statement's supporting clause. `REVIEW.md:249-250` re-invokes it *this round*: "There is no `tools/signoff.sh` in this repository to refuse such a sign-off — **this file's opening section says so, and it is still true**." Half of the opening section is still true: there is no `tools/signoff.sh`, and I confirmed it with the listing above. The other half — "and nothing else" — is not, and round 7 re-certified it as true without re-deriving it. - -That is the fresh-count family exactly, and this slice has now catalogued five instances of it: a claim re-affirmed on the strength of its previous statement rather than by running the one-line command that settles it. It is also the shape "and nothing else" absolutes always take — they are true when written and nobody re-checks them, because they read like background rather than measurement. - -The load-bearing conclusion is untouched: there is no mechanical binding, nothing would have refused an amendment to `a05e018`, and the round is happening because the rule is followed. **I agree with that reasoning and with the decision to make this a round rather than an amendment** — a sign-off held against `d9b0c01e` cannot cover bytes that moved, and saying so plainly is the same distinction I drew in round 1 about a record that is not a control. Narrow the sentence to what it needs to claim: `tools/` holds `gate.sh`, `probe_ping.exs` and `archive_sweep.sh` — a quality gate and two evidence instruments, and no signoff mechanism. - -### 3. `FINDINGS.md:303-308` still presents the version question as open — note - -The section is headed "## Semver — raised by r2, and **left open for the owner**" and closes "Publishing is the owner's step, so **the number is still theirs to change**." The owner changed it on 2026-09-07. - -It sits under the `# Round 2` top-level heading, so a reader who tracks the nesting reads it as a record of round 2's state, and on that reading it is true. I am calling it a note, not an error, for that reason. But two things make it worth one appended line: - -- `PLAN.md:213` got exactly that treatment for exactly this situation — an explicit supersede-in-place annotation over a section that named `0.1.2`. `FINDINGS.md`'s equivalent did not, and the asymmetry is arbitrary. -- Round 7's own classification of the deliberate non-sweep (`FINDINGS.md:427-439`) says the hits that stay are "`logs/round*.md`" and "the historical **rows in the tables** above". This is neither: it is prose asserting that a question is open. The classification does not reach it, which is how it slipped. - -One line under the section heading, in the `PLAN.md:213` form, closes it without rewriting anything. - ---- - -## What I verified and found correct - -**The sweep reproduces byte-identically and the population is complete.** `./tools/archive_sweep.sh` in the review checkout, output diffed against the tracked file: identical, exit 0. `enumerated : 23 / classified : 23 (11 verdicts + 12 authored lane reports) => TALLY BALANCES`, and I checked the identity the tally does not — `comm -3` between `git ls-files -- 'slices/001b-ping-guard/logs/*'` and the population the archive lists returns nothing, so the two agree name for name and not merely in count. Given my round-6 finding 1, that is the check worth doing by hand until the tally does it. - -**`probe-after.txt` carries the new version and matches a fresh run.** This is the archive you flagged, and it is the one that embeds `@server_version` compiled from `mix.exs`: - -``` -$ mix run tools/probe_ping.exs > probe7.out 2>&1 ; diff probe7.out logs/probe-after.txt -PROBE ARCHIVE BYTE-IDENTICAL TO A FRESH RUN -$ grep -n '0\.2\.0' logs/probe-after.txt -1: beam_mcp version: 0.2.0 -14: … "serverInfo":{"name":"beam_mcp","version":"0.2.0"} … -``` -Both places, header and `serverInfo`. `full-suite.txt`, `green-negotiation.txt` and `gate.txt` are covered by the sweep's own diffs, which I reproduced. - -**The `0.1.1` note is now unambiguous**, which was my round-2 question about it and the one thing I said a cold reader could still trip on. `CHANGELOG.md:73-86` states in terms that `0.1.1` does not exist and never will, that its moduledoc fix ships inside this release, and that a reader comparing Hex to the file will see `0.1.0` then `0.2.0` with a section between them naming no release. That is the explanation stated rather than left to be reconstructed, and the original section is kept under its own heading. - -**The rest of the rewritten rationale is right.** Rejecting the patch case on "`0.y.z` sits outside semver's contract" and "the fields were never correct" while saying neither makes the wire change smaller is the correct disposal of the argument I made against myself in round 2, and "**That is why this is `0.2.0` and not a patch**" placed directly under the `nil` sentence puts the reason next to the observation. It is only the one clause at `:33` that is wrong. - ---- - -## Summary and verdict - -The version decision is right, the scope was bounded and held, `lib/` and `test/` are untouched, the archives are intact in both directions, and the one archive that embeds the version regenerates byte-identically at `0.2.0`. The reasoning about why this is a round and not an amendment is sound and honestly framed, and I agree with it. - -One clause in the live `CHANGELOG` states the wire change in the wrong direction. It is one sentence, in the paragraph this round exists to rewrite, in a published package's changelog, and correcting it makes the argument stronger rather than weaker. I am blocking on that and on nothing else; findings 2 and 3 are a stale absolute and a missing annotation, both one line. - -**VERDICT: changes required** diff --git a/slices/001b-ping-guard/logs/round8.r1.md b/slices/001b-ping-guard/logs/round8.r1.md deleted file mode 100644 index 2aea2e7c..00000000 --- a/slices/001b-ping-guard/logs/round8.r1.md +++ /dev/null @@ -1,262 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 8, correctness and specification conformance -Type: Report - -## Tree read - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review8 && git write-tree -072cf981c6a97973cf9943847ddf818d483b8603 -``` - -Matches; `git status --short` clean. Written to `001b-review8/logs-r1.tree`. - -## The base, re-derived rather than taken from you - -Every claim in your message about the rebase holds: - -``` - a05e018 tree=a866ad8de07a2706735c025e98a3305c083e011b - origin/main commit=0332c41 tree=a866ad8de07a2706735c025e98a3305c083e011b - git diff a05e018 origin/main -> empty - is a05e018 an ancestor of origin/main? NO - origin/main log: 0332c41 <- 5d8d1ae <- 38e3177 -``` - -Identical trees, empty diff, and `a05e018` genuinely is not an ancestor — the rebase replayed the -one commit onto `5d8d1ae`, the same parent this slice started from, so the content landed exactly -and the local commit is a duplicate. That is the merge-method rule behaving as documented, and it -is worth noting that the thing which makes it safe to check is that the *tree* hash is the -identity, not the commit hash. - -**`lib/` is untouched and `test/` is purely additive**, verified by object hash rather than by -diff alone: - -``` - lib at origin/main: 13a26a2a1462a424f31fa2f7c04b208d9ad27ceb here: 13a26a2a… (identical) - test at origin/main: a3bacd2b33321c83126ccf20fc31a6990f74a693 here: 2c9bbea3… - $ git diff 0332c41 HEAD --name-status -- test - A test/beam_mcp/readme_claims_test.exs (one file, added, nothing else) -``` - -So every `lib/` conclusion both lanes have reached still rests on bytes we read, and the only -executable change in this round is a new test file, which I have reviewed as code below rather -than only reproducing. - ---- - -## My round-7 finding is not merely fixed; it is now mechanically prevented - -`README.md:16` reads `{:beam_mcp, "~> 0.2"}`. More than that: I put the defect back and the suite -went red. - -``` -MUT 1: {:beam_mcp, "~> 0.2"} -> {:beam_mcp, "~> 0.1"} (before=1, old after=0, new=1) - - 1) test the dependency requirement the README hands a consumer … - test/beam_mcp/readme_claims_test.exs:80 - the README no longer contains the sentence this test pins: - {:beam_mcp, "~> 0.2"} - 8 tests, 1 failure -``` - -And the guard is not specific to that one string — altering any pinned sentence fails the same -way: - -``` -MUT 2: "**neither result is decorated**" -> "**neither result is adorned**" - the README no longer contains the sentence this test pins: **neither result is decorated** - 8 tests, 1 failure -``` - -All eight `claims()` fragments are present in the README today — I extracted them from the test -source and checked each against `README.md` rather than reading them off: - -``` - 8 claims() calls found - PRESENT '{:beam_mcp, "~> 0.2"}' - PRESENT '| `ping` | removed from the revision, refused | answered |' - PRESENT '| result envelope | `resultType` and `_meta` `serverInfo` |' - PRESENT '**neither result is decorated**' - PRESENT 'every method it implements is served bare, `tools/call`' - PRESENT 'Nothing in this package refuses a request because' - PRESENT '`tools/call`, `shutdown`, `exit` at both eras' - PRESENT '**`2024-11-05` is not supported**' -``` - -The design is right, and the part I want to name is the half that is easy to leave out: the test -asserts the *quote is still there*, so a claim that moves without its test fails, and a test -guarding a deleted claim fails too. That is what stops the file rotting into decoration. Test -count checks out as well — 39 before, eight tests in the new file, `47 tests, 0 failures`. - ---- - -## Finding 1 — non-blocking. The `initialized?` check has a hole, and it is shaped like the thing it looks for - -`test/beam_mcp/readme_claims_test.exs:160-178` pins the SCR-255 property by scanning `lib/**/*.ex` -for lines containing `initialized?` and rejecting any line that also contains `initialized?:` or -`| initialized?`, on the grounds that those are declarations rather than reads. - -A pattern match is a read and contains `initialized?:`. So the filter drops the most idiomatic -Elixir form of exactly the enforcement the test exists to detect. - -**Demonstrated — and I proved the mutant applied by effect before scoring it**, because my first -attempt did not: - -``` -MUT 3 (first attempt): clause inserted before `shutdown`, i.e. AFTER the real tools/call clause. - Compiled clean. 8 tests, 0 failures. - -> unreachable. DISCARDED, not scored. This is CLAUDE.md §4b's "mutations never applied and - scored as survivors", and I walked into it from the same direction you did on mutant B. - -MUT 3 (correct): clause inserted BEFORE the real tools/call clause. - $ mix run - bare tools/call -> {"error":{"code":-32002,"message":"Session not initialized"},…} <- applied - $ mix test test/beam_mcp/readme_claims_test.exs - 1) …:139 every method is served bare, tools/call included, and tools/call reaches dispatch - 2) …:182 tools/call and shutdown are served under either declared revision - 8 tests, 2 failures - - structural test (:160, "nothing in lib/ reads the initialized? flag") fired? 0 -- it did not -``` - -So: **the security property is genuinely pinned** — two behavioural tests fail the moment -enforcement appears, which is the outcome that matters and is why this is not blocking. What is -wrong is narrower and still worth fixing: the one test whose *stated* job is "nothing reads the -flag" reports a pass while a clause is pattern-matching on it and refusing requests. Under -`CONVENTIONS.md:20-37` that is a probe that cannot see the violation it is aimed at. - -The fix follows this project's own idiom — derive, then compare to an expected set rather than -filtering by substring: - -```elixir -assert Enum.sort(lines_containing("initialized?")) == Enum.sort(@known_declarations) -``` - -Then a new line of *any* form fails, including a pattern match, and the four known declarations -are visible in the test instead of implied by a `reject`. - -## Finding 2 — non-blocking. "Eight files" is eleven, and three of them were added by this commit - -`FINDINGS.md:437`: - -> `$ grep -rn '0\.1\.2' --include='*.md' . | grep -v _build | grep -v deps/` -> -> returns hits in **eight** files. - -Run in this tree: - -``` - 9 slices/001b-ping-guard/FINDINGS.md - 8 slices/001b-ping-guard/PLAN.md - 7 slices/001b-ping-guard/logs/round7.r1.md <- added this round - 7 slices/001b-ping-guard/logs/round1.r2.md - 3 slices/001b-ping-guard/logs/round7.r2.md <- added this round - 1 slices/001b-ping-guard/REVIEW.md - 1 slices/001b-ping-guard/logs/round4.r2.md - 1 slices/001b-ping-guard/logs/round2.r2.md - 1 slices/001b-ping-guard/logs/round2.r1.md - 1 slices/001b-ping-guard/logs/round1.r1.md - 1 CONVENTIONS.md <- added this round - -> 11 distinct files -``` - -"Eight" was right for the round-7 tree. It went stale inside the commit that typed it, because the -same commit tracked the two round-7 lane reports and wrote a `CONVENTIONS.md` section quoting the -string. Seventh instance of the family, and the sharp part is *how* it was fixed: the paragraph -says "the fix is to read the command's output rather than to summarise it from memory" — the -output was read, and then the number was typed into prose, where a typed number is exactly as -perishable as before. Round 6 found the durable remedy for this and it was available here: -**delete the count and let the command speak**, e.g. "returns hits in the files that command -lists, all of them archives or historical record", with no integer to go stale. - -I checked the `CONVENTIONS.md` hit rather than assuming it: it is `the \`0.1.2\` that changed`, a -correct historical reference inside the derivation of the new rule. It stays. None of the eleven -is a live artifact stating a wrong current fact. - ---- - -## The tally at 27/27 — honest, and I checked it the way the tally cannot - -You asked whether the balance is honest or arranged. My round-6 finding 2 was that the tally -compares integers, not sets, so a balance can be arranged by a double count. I ran the set -comparison the tally does not: - -``` - enumerated: 27 lines, 27 unique - classified: 27 lines, 27 unique - duplicates among classified (an ARRANGED balance shows here): none - enumerated but NOT classified: none - classified but NOT enumerated: none - => SETS ARE EQUAL: the 27/27 balance is HONEST, not arranged -``` - -Thirteen verdicts plus fourteen lane reports, every name distinct, both set differences empty. - -**And the tally firing on you is the most useful thing in this round.** It caught a file its own -author had added and not classified — my round-5 regression, committed again one round after the -guard was built — and the file turned out to be a filtered capture, instance #4. Your record says -the honest reading is not "the guard worked", and I agree with the correction: the guard's value -is that it *fails* rather than reports. A column of `RAW` verdicts would have been clean and -silent, because the one file that mattered was not in the column at all. - -## The two mutation re-takes - -Both are raw — seed banner, progress dots, complete failure bodies with `code:` and `stacktrace:`, -`Finished in`, count — and both reproduce against my own independent runs of the same mutations: - -``` - failing test lines (order-independent) final line - mine (mut A) :80 8 tests, 1 failure - mutation-readme-a :80 8 tests, 1 failure - mine (mut B) :139 :151 :182 :191 8 tests, 2 failures - mutation-readme-b :139 :151 :182 :191 8 tests, 2 failures -``` - -The only diffs are the compile prologue, dot-run placement, and ExUnit numbering the two failures -by finish order — mine reported `:139` first, the archive `:182` first. Same set, same counts. - -Your note on mutant B is right and I would put it more strongly: `old remaining: 1` was not a weak -signal, it was **no signal**, because the replacement embeds the original. The count answered a -question nobody was asking. What proves a mutant applied is that the tree behaves differently, and -I had to apply that rule to myself this round — my first enforcement clause compiled, changed -nothing, and produced `0 failures`, which I would have been entitled to write down as "the -structural test caught nothing and neither did the behavioural one". It was discarded and re-run -with the effect proved first. SCR-259 from the other side, twice in one round, by both of us. - -## Verified - -- **Sweep**: byte-identical to the tracked `archive-sweep.txt` from a copy created empty and - verified empty with **no `_build` at all**; `exit=0`; zero `DIFFERS`; both new mutation logs - classified. The script delta is only the `mutation-readme` block, and its `[ -f "$f" ] || continue` - is fail-safe: a missing file stays enumerated by `git ls-files`, so the tally fails rather than - the file vanishing. -- **Round-7 findings 2 and 3** fixed by derivation: the moved-file set now comes from - `git diff --stat`, names `full-suite.txt` and `green-negotiation.txt`, says the version reason - does not explain them, and records `README.md` as the live artifact that should have moved. - (Finding 2 above is the knock-on for the other half.) -- **`CONVENTIONS.md`** carries the new standing rule, and it quotes my `Version.match?` table and - my framing accurately — including the part that matters most, that nothing was broken and the - defect was directional. A rule derived from a finding is worth more than the finding. -- **Gate**: six `pass` lines, `20 commentable files` (19 + the new test file), `gate exit=0`. - Full suite `47 tests, 0 failures`, and 39 + 8 = 47 checks out. -- **`logs/round7.r1.md`** as tracked is byte-identical to the bytes I wrote. - ---- - -## Summary - -The base moved and every claim about the move re-derives. `lib/` is untouched; the only executable -change is a new test file, and it is a good one — the `claims()` design gives it teeth, I proved -that by putting my own round-7 defect back and watching the suite go red, and all eight pinned -sentences are present in the README today. The two mutation re-takes are raw and reproduce against -my own runs. The 27/27 tally is honest by set comparison, not just by arithmetic. - -Nothing blocking. Two items: the `initialized?` structural check drops a pattern-match read, which -is the idiomatic form of the enforcement it hunts — the property stays pinned by the two -behavioural tests beside it, which I confirmed by mutation, so this is about that one test's -verdict rather than about coverage. And "eight files" is eleven, stale inside the commit that -typed it, where round 6 had already found the durable answer: delete the number. - -VERDICT: approve diff --git a/slices/001b-ping-guard/logs/round8.r2.md b/slices/001b-ping-guard/logs/round8.r2.md deleted file mode 100644 index 700df415..00000000 --- a/slices/001b-ping-guard/logs/round8.r2.md +++ /dev/null @@ -1,145 +0,0 @@ - - -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 001b-ping-guard, round 8, security, contract and evidence integrity -Type: Report - -**Tree read:** `072cf981c6a97973cf9943847ddf818d483b8603` - -``` -$ cd /home/aylac/Projects/beam_mcp-wt/001b-review8 && git write-tree -072cf981c6a97973cf9943847ddf818d483b8603 -``` -Written to `logs-r2.tree` there. Matches the hash you named. - -**Base re-derived, not taken from you.** `a05e018` is unreachable from the review checkout, as it must be after a rebase, so I derived the equivalence from the worktree that still holds both objects: - -``` -$ git rev-parse a05e018^{tree} 0332c41^{tree} -a866ad8de07a2706735c025e98a3305c083e011b -a866ad8de07a2706735c025e98a3305c083e011b -$ git diff a05e018 0332c41 --stat (empty) -``` -Identical trees, so the rebase carried the content exactly and the review history is continuous across it. `git diff 0332c41 072cf981 -- lib | wc -l` → `0`, and the only change under `test/` is the new file — no existing test was touched. - ---- - -## Both of my round-7 findings are closed, and finding 1 is closed better than I asked - -`CHANGELOG.md:33-48` now carries my clause and does three things I did not ask for and would not improve: it states the direction correctly for each half, it says **the `ping` change is additive and is not an argument for the bump**, and it names where the error came from rather than absorbing it. Recording that a premise agreed above this seat travelled into a live document unchecked is the more useful half. `REVIEW.md:253` replaces the absolute with `git ls-files tools/` printed, and `FINDINGS.md:305` carries the supersede annotation in the `PLAN.md` form. My `round7.r2.md` in the tree is byte-identical to what I wrote. - -**The sweep reproduces byte-identically**, exit 0, `enumerated : 27 / classified : 27 (13 verdicts + 14 authored lane reports) => TALLY BALANCES`, with both new mutation logs classified. Gate `20 commentable files`, `47 tests, 0 failures`. - ---- - -## Your first question: are the two re-takes raw? - -Yes. I reproduced both from copies with `_build` excluded, asserting mutator, `> file 2>&1`, no pipe. - -**Mutant A** (README requirement reverted to `~> 0.1`) reproduces line-for-line — same failure, same pinned-sentence message, same `code:` and `stacktrace:`, `8 tests, 1 failure`. The only diff against the archive is my run's dependency-compile prefix, which is build state. - -**Mutant B** reproduces with every content line identical and **the two failures in the opposite order** — async scheduling decides which is numbered `1)`. Same tests, same messages, same `code:`/`stacktrace:` lines, and `8 tests, 2 failures` on both sides. That count is where finding 2 comes from. - -Both files carry the seed banner, the progress dots, complete failure bodies including the multi-frame `Enum."-map/2-lists^map/1-1-"` stacktrace in B, and `Finished in`. Instance #4 is genuinely closed, and the way it was found — the tally refusing to balance over a file nobody else knew existed — is the best argument for that guard that could have been produced. - -## Your second question: can the claim tests be satisfied by a drifted README? - -**Yes, and in the direction that created the rule.** I drifted a copy two ways and ran the whole suite: - -``` -DRIFT 1 added two NEW false behavioural claims to README.md: - "Batch requests are supported at 2025-11-25" (they are refused, server.ex:84-87) - "arguments are coerced to the schema type, so "3" is accepted for an integer" - (normalize_arguments explicitly does not coerce; its comment says so) -DRIFT 2 kept every pinned fragment byte-for-byte and contradicted one in prose directly above: - "The table below ... no longer describes the shipped behaviour: ping is refused at - BOTH revisions as of this release." - -$ mix test → 47 tests, 0 failures -$ mix test test/beam_mcp/readme_claims_test.exs → 8 tests, 0 failures -``` -Nothing failed. The mechanism proves that *pinned* claims are still literally present and that the behaviour they describe holds. It cannot prove that every claim present is pinned, and `claims/1` at `readme_claims_test.exs:71-77` is a substring assertion, so surrounding prose can negate the sentence it finds. - -That is finding 1 below, and I want to be clear it is a criticism of the *rule's wording*, not of the tests. The tests are good and three of them pin claims that previously had nothing behind them, including the SCR-255 security property. - ---- - -## Findings - -### 1. The rule claims completeness the mechanism cannot deliver — non-blocking - -`CONVENTIONS.md:105`: "**Every behavioural claim in it is pinned by a test that runs.**" `readme_claims_test.exs:6` repeats it. - -**Observed** — the drift run above. A new false behavioural claim can be added to the README and the suite stays green, because nothing enumerates the README's claims; only the eight already pinned are checked. That is precisely the failure mode that produced the rule: `{:beam_mcp, "~> 0.1"}` was a behavioural claim nobody had pinned, and its survival is now explained by "a grep finds what you already thought of" — but a fixed list of eight tests finds what you already thought of in exactly the same way. - -**Expected** — the sentence to describe the mechanism. Something like: *every behavioural claim that has been identified is pinned by a test that quotes it; a claim added without a test is still silent, and adding one is a review step, not a gate.* The residual is small and stating it costs nothing; leaving it unstated makes the rule read as discharged. This slice's entire history is claims reading stronger than the mechanism behind them, and `CONVENTIONS.md` is the file that says so. - -A cheap partial, if one is wanted: pin the README's section structure, or assert a count of fenced/`|`-delimited behavioural rows, so that adding one without adding a test fails. I am not asking for that; I am asking for the sentence to match what exists. - -### 2. `FINDINGS.md` records three failures for mutant B; the archive it cites records two — non-blocking - -`FINDINGS.md:534` reads `8 tests, 3 failures REAL_EXIT=2`, and `:538` reads "three tests going red, including the two pinning the claim". `mutation-readme-b.txt:27` reads `8 tests, 2 failures`, and the file contains exactly two failure blocks. - -**This is the sixth instance of the fresh-count family, and it is the most consequential one so far**, because the discrepancy is not arithmetic — it identifies two different mutations. I built both: - -``` -MUTANT B1 session enforced by a clause head: def handle_message(%{initialized?: false} = state, …) - => 8 tests, 2 failures (served-bare, both-eras) <- matches the archive -MUTANT B2 session enforced by a field read: if not state.initialized? do throw(…) end - => 8 tests, 3 failures (those two, PLUS the reader test) <- matches the record -``` -The archived mutant is B1-shaped; the recorded number is B2's. The third failure in B2 is the `nothing in lib/ reads the initialized? flag` test — so the record's "3" makes that test look like it fired against this mutant when the archived run shows it did not. A number that flatters a guard is the worst direction for this family to fail in. - -Incidentally, your point about mutant B's source check is right and I hit it myself: my own asserting mutator refused the edit (`FAIL: old pattern still present after replace`) because the replacement embeds the original, and I had to weaken the post-condition to `count(new) == 1`. Asserting the effect rather than the disappearance is the correct reading of SCR-259 from the other side. - -### 3. The `initialized?` reader test cannot see the idiomatic way to enforce a session — non-blocking - -`readme_claims_test.exs:160-178`. The test greps `lib/**/*.ex` for `initialized?` and rejects any line containing `initialized?:` as "a declaration, not a read" (`:169-172`). In Elixir, `initialized?:` is also the **map pattern-match** form — which is how a session would most naturally be enforced. - -Demonstrated by B1 above: a clause head matching `%{initialized?: false}` that refuses `tools/call` is a genuine, working enforcement of the session, and this test stays green over it. B2 does the identical thing through `state.initialized?` and the test fires. So the test detects the unidiomatic form and misses the idiomatic one. - -Non-blocking because **the property itself is still pinned** — B1 turned the other two tests red, so "served bare" cannot change silently either way, which is the contract that matters. The reader test is a second line of defence with a hole aligned exactly with normal Elixir. Narrowing the reject to lines that also contain `:=` … more simply: reject only the two known declaration sites by matching `initialized?: boolean()` and `initialized?: false,` in `new/1`, and treat `%{state | initialized?: true}` as the write it is, so that any *other* occurrence — pattern match included — is reported. - -### 4. `~> 0.2` spans the next break exactly as `~> 0.1` spanned this one — non-blocking - -`README.md:16`, pinned by `readme_claims_test.exs:80-93`. Measured with `Version` rather than recalled: - -``` -~> 0.1 0.1.0=true 0.2.0=true 0.3.0=true -~> 0.2 0.1.0=false 0.2.0=true 0.3.0=true 0.9.0=true -~> 0.2.0 0.1.0=false 0.2.0=true 0.2.9=true 0.3.0=false -``` -This release established that **0.x MINOR is this package's break axis** — that is the entire content of the `0.1.2` → `0.2.0` decision. `~> 0.2` therefore admits `0.3.0`, and the test's own words apply verbatim to it: "a requirement admitting both sides carries a consumer across that break on a routine `deps.update`, which is what the minor bump was chosen to prevent." A consumer copying `~> 0.2` today is carried across the *next* break with no change to their requirement and no signal — r1's finding, one notch forward in time. - -The pinning test cannot catch it, because it asserts the past break only: `assert Version.match?(version, "~> 0.2")` and `refute Version.match?("0.1.0", "~> 0.2")` both stay true at `0.3.0`, so this test passes unchanged through the next break it was written to prevent. `~> 0.2.0` is the operator that matches the stated policy, and the test would then be `refute Version.match?("0.3.0", req)` — which does not go stale. - -I am flagging this rather than asserting it is wrong: `~> 0.MINOR` is a common Hex idiom and a maintainer may prefer it. But it is inconsistent with the reasoning this release is built on, and the inconsistency is the same one that was just blocked. - ---- - -## What I verified and found correct - -**The `CHANGELOG` correction is right on the measurement**, not merely reworded: `ping` `0.1.0: REFUSED -32601 → 0.2.0: answered`, and the file now separates the additive half from the breaking-shaped half and rests the decision on the latter alone. That is what I asked for and one step past it. - -**Three claims that had nothing behind them now have tests**, and I checked they are real rather than decorative: the `server/discover`/`initialize` undecorated exception, the session-tracked-not-enforced contract with `tools/call` reaching dispatch (observed via a reporting dispatch rather than inferred — `assert_receive {:dispatched, :echo}` is the right way to write that), and `tools/call`/`shutdown` at both eras. B1 and B2 both turn the security-property tests red, so that contract is genuinely pinned in both directions. - -**The tally's first live encounter is recorded honestly.** `FINDINGS.md:558-588` does not say "the guard worked"; it says the same author reintroduced the same defect one round after building the guard, and that the only reason it is in a paragraph rather than in the tree is that the guard fails rather than reports. That is the correct reading and it is the harder one to write. - -**And the round's own instance #4 is closed by the standard I have applied since round 3** — deleted, re-taken raw, and reproducible by byte comparison, which I have now done. - ---- - -## Summary and verdict - -The base moved and the move is verifiable — identical trees, empty diff, derived rather than accepted. `lib/` is untouched. My round-7 blocking finding is closed with a better paragraph than I proposed, and both non-blocking ones are closed. The two re-taken mutation archives are raw and reproduce under my hand. The claim-pinning tests are a real improvement and pin a security property that previously rested on prose. - -Four things are open and none is an artifact whose bytes are not its command's: a rule whose wording promises completeness its mechanism cannot deliver, a count in the record that identifies a different mutation from the one archived, a reader test blind to idiomatic Elixir, and a dependency requirement that spans the next break the way the old one spanned this one. Three are one line each; the fourth is a maintainer's call. - -By the standard I have applied for seven rounds — a blocking finding is a live artifact whose claim is false, or an instrument reporting clean over work it did not do — none of these qualifies. The README is now correct, the changelog is now correct, and every verdict the sweep prints is true of the shipped tree. - -**VERDICT: approve** diff --git a/slices/001b-ping-guard/logs/spec-basic-versioning.md b/slices/001b-ping-guard/logs/spec-basic-versioning.md deleted file mode 100644 index 61cbb588..00000000 --- a/slices/001b-ping-guard/logs/spec-basic-versioning.md +++ /dev/null @@ -1,185 +0,0 @@ -> ## Documentation Index -> Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt -> Use this file to discover all available pages before exploring further. - -# Versioning and Compatibility - -
- -This page defines how a client and server agree on what they are speaking: -the protocol version, declared on every request; optional extensions, -negotiated through capabilities; and interoperability with earlier, -handshake-based protocol revisions. - -There is no negotiation handshake. Every request carries its protocol -version, and the server accepts or rejects each request independently: - -```mermaid theme={null} -sequenceDiagram - participant Client - participant Server - - Client->>Server: request (with `_meta`) - alt server supports requested version - Server-->>Client: result - else version unsupported - Server-->>Client: UnsupportedProtocolVersionError - Note over Client,Server: Client retries with a mutually supported version - end -``` - -## Terminology - -This page uses the following terms for interoperability across protocol -revisions: - -* **Modern**: protocol versions that convey version, identity, and - capabilities as per-request metadata (revision `2026-07-28` and later). -* **Legacy**: protocol versions that establish a session with an - `initialize` handshake (`2025-11-25` and earlier). -* **Dual-era**: an implementation that supports both modern and legacy - versions. - -## Protocol Version Negotiation - -Every request declares the protocol version it is using in its -[`_meta`](/specification/2026-07-28/basic/index#meta) field. On HTTP, this is -also carried in the -[`MCP-Protocol-Version` header](/specification/2026-07-28/basic/transports/streamable-http#protocol-version-header). - -If the server does not implement the requested version (whether the version -is unknown to the server, or is a known version the server has chosen not to -support), it **MUST** respond with an -[`UnsupportedProtocolVersionError`](/specification/2026-07-28/schema#unsupportedprotocolversionerror) -listing the versions it does support: - -```json theme={null} -{ - "jsonrpc": "2.0", - "id": 1, - "error": { - "code": -32022, - "message": "Unsupported protocol version", - "data": { - "supported": ["2026-07-28", "2025-11-25"], - "requested": "1900-01-01" - } - } -} -``` - -The client **SHOULD** select a mutually supported version from the `supported` -list and retry the request, or surface an error to the user if no compatible -version exists. - -Servers **MUST** implement -[`server/discover`](/specification/2026-07-28/server/discover). Clients -**MAY** call it before sending any other requests to learn the server's -supported versions up front, but are not required to: a client is free to -invoke any RPC inline and handle `UnsupportedProtocolVersionError` if its -preferred version is not supported. - -## Extension Negotiation - -Clients and servers can negotiate support for optional -[extensions](/docs/extensions/overview) beyond the core protocol. Extensions -are advertised in the `extensions` field of capabilities, which is a map of -extension identifiers to per-extension settings objects. Extension identifiers -**MUST** follow the [`_meta` key naming rules](/specification/2026-07-28/basic/index#meta), -with a mandatory prefix. - -The following is an example of a client that advertises the -[MCP Apps extension](/extensions/apps/overview) identified as `io.modelcontextprotocol/ui`: - -```json theme={null} -{ - "capabilities": { - "roots": {}, - "extensions": { - "io.modelcontextprotocol/ui": { - "mimeTypes": ["text/html;profile=mcp-app"] - } - } - } -} -``` - -An example of [Tasks extension](/extensions/tasks/overview) identified as `io.modelcontextprotocol/tasks`: - -```json theme={null} -{ - "capabilities": { - "tools": {}, - "extensions": { - "io.modelcontextprotocol/tasks": {} - } - } -} -``` - -Each extension specifies the schema of its settings object; an empty object -indicates support with no additional settings. - -If one party supports an extension but the other does not, the supporting -party **MUST** either revert to core protocol behavior or reject the request -with an appropriate error. Extensions **SHOULD** document their expected -fallback behavior. - -## Backward Compatibility with Initialization-Based Versions - -A server that wishes to support both [legacy](#terminology) clients (which -expect an `initialize` handshake) and [modern](#terminology) clients (which -use per-request metadata) **MAY** implement both behaviors. - -A client that needs to interoperate with both kinds of servers detects the -server's era with transport-specific mechanics, specified in the binding -pages: - -* [stdio](/specification/2026-07-28/basic/transports/stdio#backward-compatibility): - probe with `server/discover` and fall back on any error that is not a - recognized modern error. -* [Streamable HTTP](/specification/2026-07-28/basic/transports/streamable-http#backward-compatibility): - attempt a modern request and inspect the body of a `400 Bad Request` - before falling back. - -In both cases, a recognized modern JSON-RPC error (such as -[`UnsupportedProtocolVersionError`](/specification/2026-07-28/schema#unsupportedprotocolversionerror)) -identifies a modern server: the client retries with a supported version -rather than falling back. Anything else identifies a legacy server. - -The era determination is a property of the server, not of an individual -request. Clients **SHOULD** cache the result for the lifetime of the server -process (stdio) or origin (HTTP), and **MAY** persist it across restarts of -the same server configuration, re-probing if the cached assumption later -fails. - -A server that supports only [modern](#terminology) versions **SHOULD** name -the protocol versions it supports in any error it returns to an `initialize` -request, on any transport: legacy clients have no fall-forward mechanism, and -this message may be the only diagnostic they can surface to users. - -### Compatibility Matrix - -The following matrix summarizes the expected outcome of every combination of -client and server era: - -| Client | Server | Outcome | -| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Modern | Modern | Works. `server/discover` is optional; version mismatches surface as `UnsupportedProtocolVersionError` and the client retries with a mutually supported version. | -| Modern | Legacy | Fails. The server may reject the request with an implementation-defined error, stay silent, or even process an era-ambiguous method under legacy semantics. On stdio, clients **SHOULD** send `server/discover` first to fail deterministically; the client then surfaces an actionable error to the user. | -| Dual-era | Modern | Works. The stdio probe returns a `DiscoverResult` (or `UnsupportedProtocolVersionError`); on HTTP, the first modern request succeeds or returns a modern error. The client stays modern. | -| Dual-era | Legacy | Works. stdio: the probe returns a non-modern error or times out, and the client falls back to `initialize`. HTTP: the modern request returns a `4xx` without a recognized modern error body, and the client falls back to `initialize` (and possibly further to the deprecated HTTP+SSE transport). | -| Legacy | Modern | Fails. stdio: the server rejects `initialize` with a JSON-RPC error; the exact code is implementation-defined (`initialize` is an unknown method and the request also lacks the required `_meta` fields). HTTP: the request is missing the required headers and is rejected per [server validation](/specification/2026-07-28/basic/transports/streamable-http#server-validation) with `400 Bad Request` (a client on the deprecated HTTP+SSE transport fails at its opening `GET` instead). Legacy clients have no fall-forward mechanism. | -| Legacy | Dual-era | Works. The server answers `initialize` and serves the client according to the negotiated legacy revision. | -| Legacy | Legacy | Works according to the legacy revision; out of scope for this document. | - -A dual-era **server** selects its behavior from how the client opens: - -* A request carrying modern per-request `_meta` is served statelessly - according to this revision. -* An `initialize` request selects legacy semantics, scoped to the stdio - process (stdio) or the session (HTTP), as specified by the negotiated - legacy protocol version. - -A dual-era server **MAY** serve both eras concurrently on the same endpoint -or process. diff --git a/slices/001b-ping-guard/logs/spec-changelog.md b/slices/001b-ping-guard/logs/spec-changelog.md deleted file mode 100644 index c87ef692..00000000 --- a/slices/001b-ping-guard/logs/spec-changelog.md +++ /dev/null @@ -1,123 +0,0 @@ -> ## Documentation Index -> Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt -> Use this file to discover all available pages before exploring further. - -# Key Changes - -
- -This document lists changes made to the Model Context Protocol (MCP) specification since -the previous revision, [2025-11-25](/specification/2025-11-25). - -## Major changes - -1. Remove protocol-level sessions and the `Mcp-Session-Id` header from the Streamable HTTP transport. List endpoints (`tools/list`, `resources/list`, `prompts/list`) no longer vary per-connection. Servers that need cross-call state use explicit, server-minted handles passed as ordinary tool arguments ([SEP-2567](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2567)). - -2. Make MCP stateless: remove the `initialize`/`notifications/initialized` handshake. Every request now carries its protocol version and client capabilities in `_meta` (`io.modelcontextprotocol/protocolVersion`, `io.modelcontextprotocol/clientCapabilities`). Clients SHOULD identify themselves on each request (`io.modelcontextprotocol/clientInfo`), and servers SHOULD identify themselves in each result's `_meta` (`io.modelcontextprotocol/serverInfo`). Version mismatches return `UnsupportedProtocolVersionError` ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -3. Add `server/discover`: servers MUST implement this RPC to advertise their supported protocol versions, capabilities, and identity. Clients MAY call it before any other request for up-front version selection, or use it as a backward-compatibility probe on STDIO ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -4. Replace the HTTP GET endpoint and `resources/subscribe`/`resources/unsubscribe` with `subscriptions/listen`: a single long-lived POST-response stream for opted-in server-to-client change notifications. Clients opt in to specific types (`toolsListChanged`, `promptsListChanged`, `resourcesListChanged`, `resourceSubscriptions`); the server acknowledges and tags notifications with `io.modelcontextprotocol/subscriptionId`. Request-scoped notifications such as `notifications/progress` and `notifications/message` continue to flow on the response stream of the request they relate to, not the `subscriptions/listen` stream ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -5. Remove `ping`, `logging/setLevel`, and `notifications/roots/list_changed`. Log level is now set per-request via `io.modelcontextprotocol/logLevel` in `_meta`; servers MUST NOT emit `notifications/message` for requests that did not include this field ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -6. Move experimental tasks out of the core protocol and into an official extension (`io.modelcontextprotocol/tasks`). The redesigned extension replaces the blocking `tasks/result` method with polling via `tasks/get` and a new `tasks/update` for client-to-server input, removes `tasks/list`, and allows servers to return task handles unsolicited without per-request opt-in ([SEP-2663](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2663)). - -7. Multi Round-Trip Requests (MRTR) pattern introduced which replaces the previous approach of sending server-initiated requests, such as `roots/list`, `sampling/createMessage`, or `elicitation/create`. Servers return an `InputRequiredResult` (`resultType: "input_required"`) whose `inputRequests` field carries the requests for the additional information needed to process the request. Clients respond with `inputResponses` on a retry of the original request providing the requested information. ([SEP-2322](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2322)). - -8. All results now carry a required `resultType` field: `"complete"` for ordinary results and `"input_required"` for [multi round-trip request](/specification/2026-07-28/basic/patterns/mrtr) interim results. Clients **MUST** treat results from earlier-protocol servers that omit the field as `"complete"` ([SEP-2322](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2322)). - -9. Remove SSE stream resumability and message redelivery (the `Last-Event-ID` header and SSE event IDs) from the Streamable HTTP transport. A broken response stream loses the in-flight request; clients **MUST** re-issue it as a new request with a new request ID ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -## Minor changes - -1. Add `extensions` field to `ClientCapabilities` and `ServerCapabilities` to support optional [extensions](/docs/extensions/overview) beyond the core protocol. -2. Document OpenTelemetry trace context propagation conventions for `_meta` keys (`traceparent`, `tracestate`, `baggage`) ([SEP-414](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/414)). -3. Servers **SHOULD** return tools from `tools/list` in a deterministic order to enable client-side caching and improve LLM prompt cache hit rates. -4. Require standard MCP request headers (`Mcp-Method`, `Mcp-Name`) on Streamable HTTP POST requests, and add support for custom headers from tool parameters via `x-mcp-header` ([SEP-2243](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2243)). -5. Require `ttlMs` and `cacheScope` fields on results returned by `tools/list`, `prompts/list`, `resources/list`, `resources/read`, and `resources/templates/list` via a new `CacheableResult` interface. `ttlMs` is a freshness hint (in milliseconds) allowing clients to cache responses and reduce polling; `cacheScope` (`"public"` or `"private"`) controls whether shared intermediaries may cache the response. Both fields complement existing `listChanged` notifications ([SEP-2549](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2549)). -6. Change resource not found error code from `-32002` to `-32602` (Invalid Params) to align with JSON-RPC specification. -7. Authorization servers **SHOULD** include the `iss` parameter in authorization responses per - [RFC 9207](https://datatracker.ietf.org/doc/html/rfc9207), and MCP clients **MUST** validate a - present `iss` against the recorded issuer before redeeming the authorization code - ([SEP-2468](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2468)). -8. Require MCP clients to specify an appropriate `application_type` during Dynamic Client - Registration to avoid OpenID Connect redirect URI conflicts - ([SEP-837](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/837)). -9. Clarify that client credentials are bound to the authorization server that issued them: - clients **MUST** key persisted credentials by the issuer identifier, **MUST NOT** reuse them - with a different authorization server, and **MUST** re-register when the authorization server - changes ([SEP-2352](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2352)). -10. Loosen `inputSchema` and `outputSchema` to allow any JSON Schema 2020-12 keywords, and - `structuredContent` to allow any JSON value. Add `$ref` resolution requirements and - composition-keyword resource bounds - ([SEP-2106](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2106)). -11. Remove the `notifications/elicitation/complete` notification and the - `elicitationId` field of URL mode elicitation requests, both introduced in - `2025-11-25`. Under the - [Multi Round-Trip Requests](/specification/2026-07-28/basic/patterns/mrtr) pattern, the - client learns the outcome of an out-of-band interaction by retrying the original - request, so a server-initiated completion signal — and the identifier used to - correlate it — no longer fit the protocol. Servers needing to correlate an - elicitation across retries encode their own identifier in `requestState`. -12. Define an [error code allocation policy](/specification/2026-07-28/basic/index#error-codes) - partitioning the JSON-RPC server-error range: `-32000` to `-32019` remains - implementation-defined (existing SDK usage is grandfathered), `-32020` to `-32099` is - reserved for the MCP specification. Renumber the error codes introduced in this draft - accordingly — `HeaderMismatch` `-32001` → `-32020`, `MissingRequiredClientCapability` - `-32003` → `-32021`, `UnsupportedProtocolVersion` `-32004` → `-32022` — and add - `HeaderMismatchError` to the schema, which previously existed only in transport prose. - -## Deprecated - -Features listed here remain part of the specification but are scheduled for removal under the [feature lifecycle and deprecation policy](/community/feature-lifecycle). New implementations should not adopt them. The [deprecated features registry](/specification/2026-07-28/deprecated) tracks every feature currently in the Deprecated state. - -1. Deprecate the Roots, Sampling, and Logging features - ([SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577)). - These features remain fully functional during the deprecation window but new - implementations should not add support for them. Suggested migrations: pass - directories or files via tool parameters, resource URIs, or server - configuration instead of Roots; integrate directly with LLM provider APIs - instead of Sampling; log to `stderr` (stdio) or use OpenTelemetry instead of - Logging. - -2. Reclassify the HTTP+SSE transport (deprecated since protocol version - `2025-03-26`) as Deprecated under the feature lifecycle policy - ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)). - Migrate to [Streamable HTTP](/specification/2026-07-28/basic/transports/streamable-http). - -3. Reclassify the `includeContext` values `"thisServer"` and `"allServers"` - (soft-deprecated since protocol version `2025-11-25`) as Deprecated - ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)). - Omit the field or use `"none"`; these values will be removed no later than - the Sampling feature itself. - -4. Deprecate the OAuth 2.0 Dynamic Client Registration Protocol - ([RFC7591](https://datatracker.ietf.org/doc/html/rfc7591)) as a client registration - mechanism in favor of - [Client ID Metadata Documents](/specification/2026-07-28/basic/authorization/client-registration#client-id-metadata-documents) - ([PR #2858](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2858)). - It remains available for backwards compatibility with authorization servers that do - not support Client ID Metadata Documents. - -## Other schema changes - -1. `schema.json` now correctly reflects that the Typescript definition of minimum/maximum/default are `number`'s and not just `integers`. This was caused by running the generator using `--defaultNumberType integer` ([PR#2710](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2710)). - -## Governance and process updates - -1. Adopt a specification - [feature lifecycle and deprecation policy](/community/feature-lifecycle) - defining the Active, Deprecated, and Removed feature states, a minimum - twelve-month deprecation window, and a - [registry of deprecated features](/specification/2026-07-28/deprecated) - ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)). - -## Process changes - -1. Formalize PR-based SEP workflow with markdown files in `seps/` directory, PR-derived numbering, sponsor responsibilities, and status management via PR labels ([SEP-1850](https://github.com/modelcontextprotocol/specification/pull/1850)). - -## Full changelog - -For a complete list of all changes that have been made since the last protocol revision, -[see GitHub](https://github.com/modelcontextprotocol/specification/compare/2025-11-25...2026-07-28). diff --git a/slices/001b-ping-guard/logs/spec-legacy-basic.md b/slices/001b-ping-guard/logs/spec-legacy-basic.md deleted file mode 100644 index 6e62914d..00000000 --- a/slices/001b-ping-guard/logs/spec-legacy-basic.md +++ /dev/null @@ -1,269 +0,0 @@ -> ## Documentation Index -> Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt -> Use this file to discover all available pages before exploring further. - -# Overview - -
- -The Model Context Protocol consists of several key components that work together: - -* **Base Protocol**: Core JSON-RPC message types -* **Lifecycle Management**: Connection initialization, capability negotiation, and - session control -* **Authorization**: Authentication and authorization framework for HTTP-based transports -* **Server Features**: Resources, prompts, and tools exposed by servers -* **Client Features**: Sampling and root directory lists provided by clients -* **Utilities**: Cross-cutting concerns like logging and argument completion - -All implementations **MUST** support the base protocol and lifecycle management -components. Other components **MAY** be implemented based on the specific needs of the -application. - -These protocol layers establish clear separation of concerns while enabling rich -interactions between clients and servers. The modular design allows implementations to -support exactly the features they need. - -## Messages - -All messages between MCP clients and servers **MUST** follow the -[JSON-RPC 2.0](https://www.jsonrpc.org/specification) specification. The protocol defines -these types of messages: - -### Requests - -[Requests](/specification/2025-11-25/schema#jsonrpcrequest) are sent from the client to the server or vice versa, to initiate an operation. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - id: string | number; - method: string; - params?: { - [key: string]: unknown; - }; -} -``` - -* Requests **MUST** include a string or integer ID. -* Unlike base JSON-RPC, the ID **MUST NOT** be `null`. -* The request ID **MUST NOT** have been previously used by the requestor within the same - session. - -### Responses - -Responses are sent in reply to requests, containing either the result or error of the operation. - -#### Result Responses - -[Result responses](/specification/2025-11-25/schema#jsonrpcresultresponse) are sent when the operation completes successfully. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - id: string | number; - result: { - [key: string]: unknown; - } -} -``` - -* Result responses **MUST** include the same ID as the request they correspond to. -* Result responses **MUST** include a `result` field. -* The `result` **MAY** follow any JSON object structure. - -#### Error Responses - -[Error responses](/specification/2025-11-25/schema#jsonrpcerrorresponse) are sent when the operation fails or encounters an error. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - id?: string | number; - error: { - code: number; - message: string; - data?: unknown; - } -} -``` - -* Error responses **MUST** include the same ID as the request they correspond to (except in error cases where the ID could not be read due a malformed request). -* Error responses **MUST** include an `error` field with a `code` and `message`. -* Error codes **MUST** be integers. - -### Notifications - -[Notifications](/specification/2025-11-25/schema#jsonrpcnotification) are sent from the client to the server or vice versa, as a one-way message. -The receiver **MUST NOT** send a response. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - method: string; - params?: { - [key: string]: unknown; - }; -} -``` - -* Notifications **MUST NOT** include an ID. - -## Auth - -MCP provides an [Authorization](/specification/2025-11-25/basic/authorization) framework for use with HTTP. -Implementations using an HTTP-based transport **SHOULD** conform to this specification, -whereas implementations using STDIO transport **SHOULD NOT** follow this specification, -and instead retrieve credentials from the environment. - -Additionally, clients and servers **MAY** negotiate their own custom authentication and -authorization strategies. - -For further discussions and contributions to the evolution of MCP's auth mechanisms, join -us in -[GitHub Discussions](https://github.com/modelcontextprotocol/specification/discussions) -to help shape the future of the protocol! - -## Schema - -The full specification of the protocol is defined as a -[TypeScript schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-11-25/schema.ts). -This is the source of truth for all protocol messages and structures. - -There is also a -[JSON Schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-11-25/schema.json), -which is automatically generated from the TypeScript source of truth, for use with -various automated tooling. - -## JSON Schema Usage - -The Model Context Protocol uses JSON Schema for validation throughout the protocol. This section clarifies how JSON Schema should be used within MCP messages. - -### Schema Dialect - -MCP supports JSON Schema with the following rules: - -1. **Default dialect**: When a schema does not include a `$schema` field, it defaults to [JSON Schema 2020-12](https://json-schema.org/draft/2020-12/schema) -2. **Explicit dialect**: Schemas MAY include a `$schema` field to specify a different dialect -3. **Supported dialects**: Implementations MUST support at least 2020-12 and SHOULD document which additional dialects they support -4. **Recommendation**: Implementors are RECOMMENDED to use JSON Schema 2020-12. - -### Example Usage - -#### Default dialect (2020-12): - -```json theme={null} -{ - "type": "object", - "properties": { - "name": { "type": "string" }, - "age": { "type": "integer", "minimum": 0 } - }, - "required": ["name"] -} -``` - -#### Explicit dialect (draft-07): - -```json theme={null} -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "name": { "type": "string" }, - "age": { "type": "integer", "minimum": 0 } - }, - "required": ["name"] -} -``` - -### Implementation Requirements - -* Clients and servers **MUST** support JSON Schema 2020-12 for schemas without an explicit `$schema` field -* Clients and servers **MUST** validate schemas according to their declared or default dialect. They **MUST** handle unsupported dialects gracefully by returning an appropriate error indicating the dialect is not supported. -* Clients and servers **SHOULD** document which schema dialects they support - -### Schema Validation - -* Schemas **MUST** be valid according to their declared or default dialect - -## General fields - -### `_meta` - -The `_meta` property/parameter is reserved by MCP to allow clients and servers -to attach additional metadata to their interactions. - -Certain key names are reserved by MCP for protocol-level metadata, as specified below; -implementations MUST NOT make assumptions about values at these keys. - -Additionally, definitions in the [schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-11-25/schema.ts) -may reserve particular names for purpose-specific metadata, as declared in those definitions. - -**Key name format:** valid `_meta` key names have two segments: an optional **prefix**, and a **name**. - -**Prefix:** - -* If specified, MUST be a series of labels separated by dots (`.`), followed by a slash (`/`). - * Labels MUST start with a letter and end with a letter or digit; interior characters can be letters, digits, or hyphens (`-`). - * Implementations SHOULD use reverse DNS notation (e.g., `com.example/` rather than `example.com/`). -* Any prefix where the second label is `modelcontextprotocol` or `mcp` is **reserved** for MCP use. - * For example: `io.modelcontextprotocol/`, `dev.mcp/`, `org.modelcontextprotocol.api/`, and `com.mcp.tools/` are all reserved. - * However, `com.example.mcp/` is NOT reserved, as the second label is `example`. - -**Name:** - -* Unless empty, MUST begin and end with an alphanumeric character (`[a-z0-9A-Z]`). -* MAY contain hyphens (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - -### `icons` - -The `icons` property provides a standardized way for servers to expose visual identifiers for their resources, tools, prompts, and implementations. Icons enhance user interfaces by providing visual context and improving the discoverability of available functionality. - -Icons are represented as an array of `Icon` objects, where each icon includes: - -* `src`: A URI pointing to the icon resource (required). This can be: - * An HTTP/HTTPS URL pointing to an image file - * A data URI with base64-encoded image data -* `mimeType`: Optional MIME type if the server's type is missing or generic -* `sizes`: Optional array of size specifications (e.g., `["48x48"]`, `["any"]` for scalable formats like SVG, or `["48x48", "96x96"]` for multiple sizes) -* `theme`: Optional theme preference (`light` or `dark`) for the icon background - -**Required MIME type support:** - -Clients that support rendering icons **MUST** support at least the following MIME types: - -* `image/png` - PNG images (safe, universal compatibility) -* `image/jpeg` (and `image/jpg`) - JPEG images (safe, universal compatibility) - -Clients that support rendering icons **SHOULD** also support: - -* `image/svg+xml` - SVG images (scalable but requires security precautions as noted below) -* `image/webp` - WebP images (modern, efficient format) - -**Security considerations:** - -Consumers of icon metadata **MUST** take appropriate security precautions when handling icons to prevent compromise: - -* Treat icon metadata and icon bytes as untrusted inputs and defend against network, privacy, and parsing risks. -* Ensure that the icon URI is either a HTTPS or `data:` URI. Clients **MUST** reject icon URIs that use unsafe schemes and redirects, such as `javascript:`, `file:`, `ftp:`, `ws:`, or local app URI schemes. - * Disallow scheme changes and redirects to hosts on different origins. -* Be resilient against resource exhaustion attacks stemming from oversized images, large dimensions, or excessive frames (e.g., in GIFs). - * Consumers **MAY** set limits for image and content size. -* Fetch icons without credentials. Do not send cookies, `Authorization` headers, or client credentials. -* Verify that icon URIs are from the same origin as the server. This minimizes the risk of exposing data or tracking information to third-parties. -* Exercise caution when fetching and rendering icons as the payload **MAY** contain executable content (e.g., SVG with [embedded JavaScript](https://www.w3.org/TR/SVG11/script.html) or [extended capabilities](https://www.w3.org/TR/SVG11/extend.html)). - * Consumers **MAY** choose to disallow specific file types or otherwise sanitize icon files before rendering. -* Validate MIME types and file contents before rendering. Treat the MIME type information as advisory. Detect content type via magic bytes; reject on mismatch or unknown types. - * Maintain a strict allowlist of image types. - -**Usage:** - -Icons can be attached to: - -* `Implementation`: Visual identifier for the MCP server/client implementation -* `Tool`: Visual representation of the tool's functionality -* `Prompt`: Icon to display alongside prompt templates -* `Resource`: Visual indicator for different resource types - -Multiple icons can be provided to support different display contexts and resolutions. Clients should select the most appropriate icon based on their UI requirements. diff --git a/slices/002-streamable-http/FINDINGS.md b/slices/002-streamable-http/FINDINGS.md deleted file mode 100644 index 3fd666ec..00000000 --- a/slices/002-streamable-http/FINDINGS.md +++ /dev/null @@ -1,196 +0,0 @@ - - -# Slice 002 — findings - -Three review rounds, eight lanes. This is the record of what was wrong and who found it, kept -because the pattern across the rounds is more useful than any single finding. - -## The pattern, stated first - -**Each round's fixes bred the next round's blockers.** - -| round | blockers | how many were caused by the previous round's fixes | -|---|---|---| -| 1 | 7 | — | -| 2 | 2 blocking + 5 filed | 2 of 2 — both were shapes fixed once in the same commit that reintroduced them | -| 3 | 4 blocking across 3 lanes | 2 of the 3 highest — the rescue rework and the Base64 scoping | - -That base rate is why round 3 and round 4 exist. It is not caution; it is a measured probability -that a fix of this size carries a regression, and it was measured on this slice. - -## Attribution, where it belongs - -**The rescue regression is the coordinator's, recorded as such at the coordinator's instruction.** - -The instruction was to wrap the whole of `call/2` rather than add five guards, and that shape was -right: eight inputs were producing a bare bodyless 500 and one produced no response at all, -because the refusal path itself sat outside every rescue. What neither of us considered was the -exceptions already passing through that path **carrying meaning**. `Bandit.HTTPError` has a -`plug_status`, so the wrap turned `408` into `500`, `400` into `500`, and every stalled connection -into an unauthenticated 5xx with an error-level stacktrace in the host's log. - -The class fix was right in shape and wrong in blast radius, and the difference between those two -is exactly what a lane exists to find. `Plug.Exception.status/1` — Plug's own protocol, so it -holds for adapters other than Bandit and needs no reference to a module that may not be loaded — -is a better answer than either of us had going in. - -The lane proved it a regression rather than arguing it: the same probe against `a5cfb67` returned -408/400/400 and against `HEAD` returned 500/500/500. - -## My own instrument failing — the two self-corrections - -These carry the same weight as the lanes' findings. They are the hardest class to catch, because -the thing that is broken is the thing doing the checking, and nobody else can catch them for you: -a lane reads the code, not the reasoning that produced the evidence about the code. - -**1. "One mutant per header read" was one mutant per header NAME.** `compare_versions/3` performs -two value comparisons on `MCP-Protocol-Version` and I pinned one. A first-value-only mutant on the -second **survived the entire suite** — and that branch is the only version check that runs on a -body carrying no `_meta`, which is every request that does not declare its era in the body. The -round-2 finding was "you counted the reads you had in mind rather than the reads the code makes", -and the evidence I produced to close it made the same error one level down. - -**2. The derivation grep was misreported.** The record and the code comment both said -`grep 'get_req_header'` returns the helper and the `mcp-param-` sweep. It does not: the sweep -reads `conn.req_headers` and never calls `get_req_header`, and the grep also matches the comment -describing itself. The completeness argument rested on quoted output that did not say what it was -quoted as saying — which is the same defect as a gate reporting a verdict without running its -probe, in the place where the verdict was mine. - -## The sharpest finding, as a rule rather than an incident - -`Mcp-Param-{Name}` derived its population **from the request**. - -That is not a missing derivation. It is a derivation from the wrong side of the trust boundary, -and from inside it, it looks identical to the correct one — no hand-written list, a new header -inherits the behaviour. It made the specification's *"client omits the header but the value is in -the body → server MUST reject"* unenforceable by construction: a server whose set comes from the -caller's headers cannot see an omission. - -Now in `CONVENTIONS.md` as **"Deriving from attacker-controlled input is not deriving a -population"**, because "derive it" has been the answer often enough here that the next reader will -apply it without asking *from what*. - -## Round-by-round - -### Round 1 — seven blocking - -The package did not compile without `plug` (`optional: true` governs resolution, not compilation); -`inspect(reason)` leaked a planted bearer token and a `postgres://` URL into a 403 body served to -an unauthenticated caller; a non-map `_meta` crashed outside the rescue; `Mcp-Method`/`Mcp-Name` -were neither required nor validated — the spec's own named vulnerability; an unimplemented method -answered `200`; five error paths poisoned keep-alive through a `with/else` binding loss, visible -only at ≥16 KB; `throw`/`exit` escaped `rescue`. - -My own probe failures in that round: a dispatch-crash probe that silently did not apply and was -reported as a `200`; server options passed by a hardcoded `Keyword.take` that silently dropped two -new ones; and an acceptance criterion written impossibly. - -### Round 2 — two blocking, both reintroductions - -Only the first value of `Mcp-Method`, `Mcp-Name` and `MCP-Protocol-Version` was validated — the -smuggling shape fixed for `Origin` in the same commit that wrote three new single-value reads. And -the refusal path sat outside every rescue. - -The round-1 multi-`Origin` fix had **no test at all**: `Enum.all?` → `Enum.any?` survived 82/82. -Right, unpinned, and nothing would have caught its removal. - -### Round 3 — four blocking, two of them caused by round 2 - -The rescue regression above; Base64 decoding applied to every header, which let -`Mcp-Method: =?base64?…?=` satisfy this server while a gateway saw an opaque token; the -`Mcp-Param` population derived from the request; `initialize` answering `200` with -`protocolVersion: "2025-11-25"` while the README said it was not implemented; and -`Code.ensure_loaded?` in `init/1` rejecting a valid catalog that lives in the host's own project. - -`tools/probe_optional_deps.sh` passed throughout — it proves the package **compiles**, not that a -host can **start**. - -## Evidence - -`logs/mutation.md` — 23 mutants across three rounds, each asserted applied before scoring, with -one recorded equivalent survivor and three compiler-kill completions. `logs/round{1,2,3}.*.md` — -the lanes' own reports. `logs/gate-round{2,3}.txt` — the gate at each boundary. - -## Round 6 — the regression was in the anchors, not the code - -Rounds 1-4's pattern was a fix reintroducing a defect. Round 5's fixes were **correct** and two -of their anchors could not move, which is the same failure one level up: the suite reported them -pinned and they were not. - - M8 mirrored_params/2 swallows the host fault to %{} round 5: SURVIVED 133/0 - M2 fault_response/4 always re-raises round 5: SURVIVED 133/0 - -M8's live behaviour under the mutant was `Mcp-Param-MaxRows: 99` against a body of `42` served -**200 and dispatched**, with the omitted-header MUST unenforced — the exact disagreement the -mirrored-header mechanism exists to prevent, at a green suite. - -Why the anchors could not move: the catalog fixture raised on *every* call, so the core's own -lookup raised too and produced the same status and code by a different route, and the test -asserted only status and code. The echoed `id` is what separates the routes, and it was not -asserted — although "so the id stays available" was the stated reason for returning the fault -rather than throwing it. Both are fixed by a catalog that raises **once**; scoring is in -`logs/mutation-round6.txt`, five mutants, all killed. - -## Open, recorded rather than fixed - -**1. `fault_response/4`'s re-raise branch is unpinned.** Measured: the mutant that never -re-raises survives at `137 tests, 0 failures`. Detecting it needs a non-500 `:plug_status` -exception from code that is not the host's, which after round 5 means the adapter's read path -alone — `Bandit.HTTPError` at 400, `Plug.TimeoutError` at 408. `Plug.Test` produces neither. -**Closing it needs a Bandit-backed test.** This is the item the deleted stand-in's comment -claimed was "filed"; it is filed here, and the difference between those two sentences is the -whole reason this section exists. - -**2. Refusals that fire before `read_body/2` answer on a conn with an unread body and no -`connection: close`.** Bandit then drops the connection, so a pipelined second request is not -answered. Measured by lane s3: - - ok authorize (baseline, 200) second-request-answered=True - authorize raises -> 500 second-request-answered=False - catalog raises (after read_body) -> 500 second-request-answered=True - -Pre-existing, not a round-5 regression: it applies equally to the `403` for a bad Origin, the -`403` for a refused caller and the `405`, all of which predate this round. It fails **closed** — -no misframing, no smuggling — which is why it is filed rather than blocking. -`read_body_bounded/1`'s `413` already calls `close_after/1`; the pre-read refusals could do the -same. Same family as round 1's keep-alive finding. - -## Round 7 — the code was sound; the records about it were not - -Lane v1 read tree `3fd986f2` and found **no defect in `lib/`**. Both blockers were -record-integrity defects, in the round whose entire subject was record integrity. - -**1. The re-archived docs probe recorded the gate red on the shipping tree.** Its restored -section read `docs pass` beside `GATE_EXIT=1`, which no re-run could reproduce. The cause: when -that probe ran, credo was red on nested-module test fixtures — fixed later in the same commit — -and the archive was piped through `grep`, so the filter hid the `credo FAIL` line and left a -passing step next to a failing exit with nothing to explain it. Two defects in one file: the -exit code did not belong to the run as shown, and **a filtered transcript is not a verbatim -archive.** Re-run captured whole. - -**2. `mutation-round6.txt` was headed "on the tree that ships" and was scored at 136 tests.** -The shipping tree was 137 — the same commit added a test to `readme_claims_test.exs` after the -table was produced. All five mutants did die and every failure count was right; only the label -was false. Re-run at 138 in `logs/mutation-round7.txt`, with three mutants the round-6 set did -not cover. - -**The pattern, seven rounds in.** Rounds 1-4: a fix reintroducing a defect. Round 5: fixes -correct, anchors unable to move. Round 6: anchors fixed, records about them wrong. The failure -keeps moving one level away from the code — defect, then test, then record — and at each level -the same rule catches it: derive the population, quote the count, capture the whole output. - -Three anchors that could not move, found this round and now killed (`logs/mutation-round7.txt`): - - M13 annotations/1 moved inside host_call/1 round 6: SURVIVED - M13_M2 ...plus fault_response always re-raises round 6: SURVIVED - M10full consumers relax the module tag round 6: SURVIVED - -M13 is the sharp one: moving `annotations(spec.input_schema)` inside `host_call/1` is this -module's *own stated discipline* for host territory, and doing it rerouted the round-6 test and -disarmed the mutant it existed to kill — round 5's defect reproduced one refactor away, inside -the test written to fix round 5's defect. Closed by asserting the `id`, which is the only thing -distinguishing the two routes. diff --git a/slices/002-streamable-http/PLAN.md b/slices/002-streamable-http/PLAN.md deleted file mode 100644 index a4312b6c..00000000 --- a/slices/002-streamable-http/PLAN.md +++ /dev/null @@ -1,164 +0,0 @@ - - -# Slice 002 — stateless Streamable HTTP, and the conformance gap that ships with it - -**Written before any code.** Release **0.3.0**. Base `origin/main` at `bee3d26` (published -`0.2.0`). Worktree `/home/aylac/Projects/beam_mcp-wt/002-http`, its own `_build` and `deps`. - -Every specification claim below is quoted from an **archived** page, not recalled: -`logs/spec-streamable-http.md` (fetched by `curl -sSL --fail`, 31525 bytes), -`logs/spec-changelog.md` and `logs/spec-basic-versioning.md` (carried forward from the earlier -slice that fetched them). - -## 1. What an HTTP request with no era established gets — answered before any code - -**This is SCR-255's question, and the transport specification answers half of it for us.** - - Every POST request to the MCP endpoint **MUST** include an - `MCP-Protocol-Version` header. - The header value **MUST** match the `io.modelcontextprotocol/protocolVersion` - field carried in the request body's `_meta`. If the values do not match, the - server **MUST** reject the request with `400 Bad Request` and a `HeaderMismatch` - JSON-RPC error. - -- logs/spec-streamable-http.md:252-261 - -So **the bare-request path that exists on stdio cannot exist over conformant HTTP.** On stdio a -client may send `tools/call` with no `initialize` and no `_meta`, and the package serves it — -SCR-255's measurement. Over HTTP the same request is malformed: the header is mandatory, and it -must agree with the body. A Plug that enforces the header refuses the no-era request as a -protocol matter, not as a policy choice. - -**That closes the era half and closes none of the authorization half.** A request can carry a -perfect `MCP-Protocol-Version` header and still be from anyone who can reach the port. -`tools/call` executes through the host's dispatch. That is the confused-deputy shape, and the -header requirement does nothing about it. - -### The answer, in the required form - -**The package makes refusal inescapable; it does not decide who may call.** - -`BeamMCP.Transport.HTTP` takes a **required option with no default**: an authorization function -supplied by the host. A host that wires the Plug without it **fails at start, not at request -time**. - -Why this and not the alternatives: - -- **The package cannot decide who may call.** It has no view of the host's identity model. A - package that authorized on the host's behalf would be claiming something it cannot keep — the - same over-claim this repository has spent five slices removing from prose. -- **"The host should authenticate" is not a control.** SCR-255 already records that a requirement - nobody is told about is not a control; a requirement everybody is *told* about is not one - either. A README paragraph is documentation. **A required argument with no default is a - contract**, because the host cannot start without answering it. -- **Serving `tools/call` to any caller that reaches the port is the hazard**, and shipping it with - a footnote would be the package putting a confused-deputy surface on a port and calling the - consequence someone else's. - -**Origin validation is a second required decision, and the spec makes it a MUST:** - - Servers **MUST** validate the `Origin` header on all incoming connections to - prevent DNS rebinding attacks. If the `Origin` header is present and invalid, - servers **MUST** respond with HTTP 403 Forbidden. - -- logs/spec-streamable-http.md:57-61 - -"Valid" is host knowledge. So the allowed origins are a **second required option with no -default**, for the same reason and by the same mechanism. - -**Recorded as reversible**: this is the coordinator's call, flagged to the owner. If a materially -better mechanism appears while building, it is raised before being built, not substituted. - -## 2. Scope — three things, one release - -1. **SCR-253 / 002 — stateless Streamable HTTP.** A Plug on Bandit at `/mcp`, the `2026-07-28` - stateless model: **no sessions, no `Mcp-Session-Id`, no SSE resumability** (changelog items 1 - and 9). `handle_message/2` **does not change** — this is a second caller of the existing core. - **Bandit and Plug only**; nothing else added. -2. **SCR-261 — `ttlMs` and `cacheScope` on `tools/list`.** Verified against the archived spec - rather than the issue: *"Require `ttlMs` and `cacheScope` fields on results returned by - `tools/list` … via a new `CacheableResult` interface."* Ships **with** HTTP rather than after, - because serving a non-conformant modern era over a public port is worse than over a pipe. - Both values are host knowledge (a freshness hint about the host's catalog; a disclosure - decision about shared caches), so they are supplied, not invented — `cacheScope` defaulting to - the **non-permissive** value if the host says nothing. -3. **001c's shipped code, carried; its slice record dropped.** `README.md` requirement, the policy - test, and `CHANGELOG.md` into `files:`. The code is correct and was reviewed; the seven rounds - of archive discipline around it are not re-run. - -**Already found by carrying it, and worth recording:** moving the version to `0.3.0` made the -carried policy test **fail** — the README still said `~> 0.2.0`, which does not admit `0.3.0`. -That test was written in 001c to catch exactly this and this is its first real use. README moved -to `~> 0.3.0`. - -## 3. Red first — one per scope item, before any implementation - -| # | red | shows | -|---|---|---| -| 1 | an HTTP request against today's package | there is no endpoint: nothing listens, no Plug exists | -| 2 | a `tools/list` result at `2026-07-28` | no `ttlMs`, no `cacheScope` — the required fields absent | -| 3 | wiring the Plug with no authorization option | **must fail at start**, and does not until the option exists | - -Each recorded verbatim by redirect before the corresponding code is written. - -## 4. Resilience checks — named before the Plug is written, not after - -Reported as a table of command and observed result: - -| check | question | -|---|---| -| supervision | what supervises the Bandit listener | -| handler crash | a request handler raises — does the listener survive, does the **next** request succeed | -| concurrency | two requests in flight — do they interfere through any shared state | -| malformed input | bad JSON, wrong content-type, empty body, oversized body — **a response, not a stacktrace** | -| resource bounds | is there a body-size limit; what happens without one | -| dispatch crash | a crash in the **host's** dispatch function — what reaches the transport, what reaches the client | - -The last is the one that matters most for a package whose whole design is host-injected -behaviour: the host's code runs inside our request path. - -## 5. Out of scope, filed not fixed - -SCR-263 (sweep population), SCR-265 (signoff binding), SCR-271 (`Transport.Stdio` moduledoc), -SCR-249 (`mix docs` in the gate), SCR-262 (gate REUSE population), 003 (provenance identity). - -## 6. Review - -**Two lanes, two rounds, scoped to the shipped artefact** — `lib/`, `test/`, `README.md`, -`CHANGELOG.md`, `mix.exs`. Findings about slice records or evidence prose are **filed, not -blocking**. Plus a **third security lane** on the HTTP surface, briefed from §1's answer, which -is on the artefact and in scope. - -The bound is deliberate: the last three slices each ran seven or eight rounds with the code -settled by round two, and almost every finding after that was in records rather than in what -ships. - -## 7. Acceptance criteria - -1. All three reds demonstrated and archived before their fixes. -2. A `tools/list` over HTTP at `2026-07-28` carries `ttlMs` and `cacheScope`. -3. A POST with no `MCP-Protocol-Version` header, or one disagreeing with the body, is rejected — - `400` with the spec's error, not a stacktrace. -4. An invalid `Origin` gets `403`. -5. Wiring the Plug without the authorization option fails at **start**. -6. `handle_message/2` changes in exactly one clause — `tools/list`, for scope item 2 — and - nowhere else. **This criterion was written wrong and is corrected here rather than quietly - failed.** §2 says "`handle_message/2` **does not change**", which is true of scope item 1: - HTTP is a second caller of the existing core and adds no clause to it. Criterion 6 then - restated that absolutely, which scope item 2 makes impossible — SCR-261 requires fields on - the `tools/list` result, and that result is built inside `handle_message/2`. The two - statements were written at different moments about different scope items and only one of - them can be an acceptance criterion. Verified by `git diff bee3d26 -- lib/beam_mcp/server.ex`: - the only changes are `new/1`'s two host-supplied options, the typespec entries for them, and - the `tools/list` clause. - - **Appended in round 5, not rewritten.** The criterion's CLAIM still holds — `handle_message/2` - changes in exactly one clause. Its stated VERIFICATION no longer does: running that command - today also shows `+ alias BeamMCP.ToolCatalog`, a blank line after `@modern_version`, and - `find_tool/2`'s three clauses collapsed into one delegating to `ToolCatalog.fetch/2` - (`26 insertions(+), 13 deletions(-)`). `find_tool/2` is a private helper, so the claim is - unaffected; the sentence listing what the diff contains was written when it was true and was - never re-checked. That is the fresh-count family in the shape absolutes always take. -7. Every resilience check in §4 has a command and an observed result. -8. `./tools/gate.sh` exits 0 with every step line reading `pass`. diff --git a/slices/002-streamable-http/logs/full-suite.txt b/slices/002-streamable-http/logs/full-suite.txt deleted file mode 100644 index 9cedeef4..00000000 --- a/slices/002-streamable-http/logs/full-suite.txt +++ /dev/null @@ -1,142 +0,0 @@ -Running ExUnit with seed: 915688, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................... -13:50:10.163 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -13:50:10.172 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -13:50:10.275 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1022: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1023: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -13:50:10.330 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -13:50:10.330 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -13:50:10.331 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -13:50:10.331 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -13:50:10.331 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -13:50:10.332 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -13:50:10.441 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -13:50:10.442 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1033: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1036: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -13:50:10.442 [info] beam_mcp: refused by host authorize/1: :nope -.................... -Finished in 1.5 seconds (0.6s async, 0.9s sync) -126 tests, 0 failures diff --git a/slices/002-streamable-http/logs/gate-blockers-fixed.txt b/slices/002-streamable-http/logs/gate-blockers-fixed.txt deleted file mode 100644 index ea3706b4..00000000 --- a/slices/002-streamable-http/logs/gate-blockers-fixed.txt +++ /dev/null @@ -1,9 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - reuse pass (23 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate-body-cap-measured.txt b/slices/002-streamable-http/logs/gate-body-cap-measured.txt deleted file mode 100644 index 87e2cd2c..00000000 --- a/slices/002-streamable-http/logs/gate-body-cap-measured.txt +++ /dev/null @@ -1,9 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - reuse pass (24 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate-release.txt b/slices/002-streamable-http/logs/gate-release.txt deleted file mode 100644 index 2e77b919..00000000 --- a/slices/002-streamable-http/logs/gate-release.txt +++ /dev/null @@ -1,10 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate-round2.txt b/slices/002-streamable-http/logs/gate-round2.txt deleted file mode 100644 index 29da4289..00000000 --- a/slices/002-streamable-http/logs/gate-round2.txt +++ /dev/null @@ -1,16 +0,0 @@ -# Gate after the round-2 class fixes - -2026-09-07T13:13:24-04:00 - -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - reuse pass (22 commentable files) - licence files pass -Gate OK. - -# The optional-dependency probe, run alone, with its artefact assertions -pass: consumer compiles without plug; Server present, Transport.HTTP absent diff --git a/slices/002-streamable-http/logs/gate-round3.txt b/slices/002-streamable-http/logs/gate-round3.txt deleted file mode 100644 index d07edc20..00000000 --- a/slices/002-streamable-http/logs/gate-round3.txt +++ /dev/null @@ -1,12 +0,0 @@ -# Gate after the round-3 fixes -2026-09-07T13:50:04-04:00 - -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - reuse pass (23 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate-round5-file-fixes.txt b/slices/002-streamable-http/logs/gate-round5-file-fixes.txt deleted file mode 100644 index 2e77b919..00000000 --- a/slices/002-streamable-http/logs/gate-round5-file-fixes.txt +++ /dev/null @@ -1,10 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate-round5-fixes.txt b/slices/002-streamable-http/logs/gate-round5-fixes.txt deleted file mode 100644 index 2e77b919..00000000 --- a/slices/002-streamable-http/logs/gate-round5-fixes.txt +++ /dev/null @@ -1,10 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate-round6.txt b/slices/002-streamable-http/logs/gate-round6.txt deleted file mode 100644 index 2e77b919..00000000 --- a/slices/002-streamable-http/logs/gate-round6.txt +++ /dev/null @@ -1,10 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate-round7.txt b/slices/002-streamable-http/logs/gate-round7.txt deleted file mode 100644 index 2e77b919..00000000 --- a/slices/002-streamable-http/logs/gate-round7.txt +++ /dev/null @@ -1,10 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/gate.txt b/slices/002-streamable-http/logs/gate.txt deleted file mode 100644 index 22e05940..00000000 --- a/slices/002-streamable-http/logs/gate.txt +++ /dev/null @@ -1,8 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - reuse pass (22 commentable files) - licence files pass -Gate OK. diff --git a/slices/002-streamable-http/logs/green-cacheable-fields.txt b/slices/002-streamable-http/logs/green-cacheable-fields.txt deleted file mode 100644 index 258345be..00000000 --- a/slices/002-streamable-http/logs/green-cacheable-fields.txt +++ /dev/null @@ -1,9 +0,0 @@ -tools/list at 2026-07-28, result keys: - _meta - cacheScope - resultType - tools - ttlMs - - ttlMs present? true - cacheScope present? true diff --git a/slices/002-streamable-http/logs/green-host-exception-envelope.txt b/slices/002-streamable-http/logs/green-host-exception-envelope.txt deleted file mode 100644 index 5f29ec00..00000000 --- a/slices/002-streamable-http/logs/green-host-exception-envelope.txt +++ /dev/null @@ -1,155 +0,0 @@ -Running ExUnit with seed: 753710, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........ -15:26:28.018 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -15:26:28.019 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1061: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1064: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -15:26:28.075 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1050: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1051: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -15:26:28.075 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:26:28.076 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -15:26:28.128 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -15:26:28.230 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1039: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool's exception is answered in the envelope even when it carries a status"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1042: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool's exception is answered in the envelope even when it carries a status"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -15:26:28.237 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:26:28.238 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:26:28.238 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -15:26:28.238 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -15:26:28.292 [info] beam_mcp: refused by host authorize/1: :nope -............ -15:26:28.396 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -Finished in 0.6 seconds (0.6s async, 0.00s sync) -77 tests, 0 failures diff --git a/slices/002-streamable-http/logs/green-integer-comparison.txt b/slices/002-streamable-http/logs/green-integer-comparison.txt deleted file mode 100644 index e53007fc..00000000 --- a/slices/002-streamable-http/logs/green-integer-comparison.txt +++ /dev/null @@ -1,144 +0,0 @@ -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 698390, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - -15:24:34.941 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -15:24:34.950 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:24:34.950 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:24:34.950 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -15:24:34.952 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1033: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1036: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -15:24:35.115 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:24:35.115 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -15:24:35.166 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1022: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1023: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -15:24:35.217 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -15:24:35.268 [info] beam_mcp: refused by host authorize/1: :nope -....... -15:24:35.320 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -15:24:35.323 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -Finished in 0.6 seconds (0.6s async, 0.00s sync) -76 tests, 0 failures diff --git a/slices/002-streamable-http/logs/green-leading-zeros.txt b/slices/002-streamable-http/logs/green-leading-zeros.txt deleted file mode 100644 index 7126cf26..00000000 --- a/slices/002-streamable-http/logs/green-leading-zeros.txt +++ /dev/null @@ -1,174 +0,0 @@ -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 201511, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.. -15:52:17.477 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:798: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:52:17.479 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:798: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -15:52:17.534 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -15:52:17.535 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1067: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:798: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1068: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -15:52:17.536 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:771: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:52:17.536 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:771: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:52:17.536 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:771: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:52:17.536 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:798: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:52:17.541 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1033: BeamMCP.Transport.HTTPTest.RaisingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:771: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1039: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:52:17.541 [info] beam_mcp: refused by host authorize/1: :nope -............. -15:52:17.600 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -15:52:17.703 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:771: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -15:52:17.860 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:798: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -15:52:17.914 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1078: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:798: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1081: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -Finished in 0.7 seconds (0.7s async, 0.00s sync) -77 tests, 0 failures diff --git a/slices/002-streamable-http/logs/keepalive.txt b/slices/002-streamable-http/logs/keepalive.txt deleted file mode 100644 index 33561ffa..00000000 --- a/slices/002-streamable-http/logs/keepalive.txt +++ /dev/null @@ -1,14 +0,0 @@ -### KEEP-ALIVE: every error path must answer AND leave the connection usable. -### Raw socket, two requests on one connection, 16 KB bodies -- the defect is size-dependent -### and a few dozen bytes arrive in one adapter read, which is why the unit tests missed it. - - -12:48:49.567 [info] Running BeamMCP.Transport.HTTP with Bandit 1.12.5 at 127.0.0.1:4321 (http) -Two requests on ONE keep-alive socket. req2 is always a well-formed tools/list. -A 16 KB body is used because the defect is size-dependent: small bodies arrive in one -adapter read and mask it, which is why every unit test passed while five paths were broken. - 400 bad JSON (16 KB) req1: HTTP/1.1 400 Bad Request req2: HTTP/1.1 200 OK - 400 non-object JSON (16 KB) req1: HTTP/1.1 400 Bad Request req2: HTTP/1.1 200 OK - 400 _meta not a map (16 KB) req1: HTTP/1.1 400 Bad Request req2: HTTP/1.1 200 OK - 400 header mismatch (16 KB) req1: HTTP/1.1 400 Bad Request req2: HTTP/1.1 200 OK - 200 baseline (16 KB) req1: HTTP/1.1 200 OK req2: HTTP/1.1 200 OK diff --git a/slices/002-streamable-http/logs/measure-read-before-refusal.txt b/slices/002-streamable-http/logs/measure-read-before-refusal.txt deleted file mode 100644 index 3e96a624..00000000 --- a/slices/002-streamable-http/logs/measure-read-before-refusal.txt +++ /dev/null @@ -1,53 +0,0 @@ -### The read-before-refusal measurement, settling the README sentence r2 flagged. -### Written by the command that produced it. Script: -### tools/measure_body.exs -- a Bandit listener on 127.0.0.1:4931 whose plug calls -### Plug.Conn.read_body(conn, length: 1_048_576) and reports byte_size of the partial, -### and a raw :gen_tcp client that writes 64 KiB chunks against a declared 32 MiB -### Content-Length, counting what it wrote before the response arrived. -### -### A = server-side: byte_size of read_body/2's partial before the refusal -### B = wire-side: bytes the client wrote before the response arrived - ---- run 1 --- -declared Content-Length: 33554432 bytes (32 MiB) -sndbuf B: client wrote A: server read before refusing -default 3538944 (3.375 MiB) 1048576 -4096 1441792 (1.375 MiB) 1048576 -16384 1507328 (1.438 MiB) 1048576 -65536 1769472 (1.688 MiB) 1048576 -262144 2359296 (2.25 MiB) 1048576 -1048576 2818048 (2.688 MiB) 1048576 ---- run 2 --- -declared Content-Length: 33554432 bytes (32 MiB) -sndbuf B: client wrote A: server read before refusing -default 5570560 (5.313 MiB) 1048576 -4096 1638400 (1.563 MiB) 1048576 -16384 1179648 (1.125 MiB) 1048576 -65536 1638400 (1.563 MiB) 1048576 -262144 2752512 (2.625 MiB) 1048576 -1048576 1310720 (1.25 MiB) 1048576 ---- run 3 --- -declared Content-Length: 33554432 bytes (32 MiB) -sndbuf B: client wrote A: server read before refusing -default 6553600 (6.25 MiB) 1048576 -4096 1703936 (1.625 MiB) 1048576 -16384 1966080 (1.875 MiB) 1048576 -65536 1376256 (1.313 MiB) 1048576 -262144 2752512 (2.625 MiB) 1048576 -1048576 2228224 (2.125 MiB) 1048576 ---- run 4 --- -declared Content-Length: 33554432 bytes (32 MiB) -sndbuf B: client wrote A: server read before refusing -default 7798784 (7.438 MiB) 1048576 -4096 1638400 (1.563 MiB) 1048576 -16384 1638400 (1.563 MiB) 1048576 -65536 1245184 (1.188 MiB) 1048576 -262144 2031616 (1.938 MiB) 1048576 -1048576 2031616 (1.938 MiB) 1048576 - -### CORRECTION, appended 2026-09-07 rather than rewritten. -### This header first named the producing script as `scratchpad/measure_body.exs`, the path it -### ran from before it was tracked. The committed script is `tools/measure_body.exs`. A lane -### found it: an archive labelled as written by the command that produced it must name a command -### a reader can actually run, or the label is doing no work. The DATA above is untouched -- it -### is the bytes that run produced, and only the path in the header was wrong. diff --git a/slices/002-streamable-http/logs/mutation-round6.txt b/slices/002-streamable-http/logs/mutation-round6.txt deleted file mode 100644 index 65e306d3..00000000 --- a/slices/002-streamable-http/logs/mutation-round6.txt +++ /dev/null @@ -1,30 +0,0 @@ -### Round 6 -- the new tests scored by mutation, on the tree that ships. -### Each mutant is applied to lib/, compiled with --warnings-as-errors --force so a compiler -### kill is never scored as a test kill, then measured with mix test. -### -### Round 5 shipped two of these anchors unable to move: M8 and M2 both SURVIVED at -### 133 tests, 0 failures, and M8's live behaviour was a lying mirrored header served 200 -### and dispatched. Found by lane s3. - -BASELINE: -136 tests, 0 failures - ---- M8 --- -mutant: mirrored_params/2 swallows the host fault to %{} -136 tests, 2 failures - ---- M6 --- -mutant: check_param_headers/4 loses its fault case -136 tests, 2 failures - ---- M2 --- -mutant: fault_response/4 always re-raises (the bodyless-500 shape) -136 tests, 1 failure - ---- M3 --- -mutant: host_call/1 loses its catch (throw/exit lose the id) -136 tests, 1 failure - ---- M4 --- -mutant: authorize/2 loses its fault clause -136 tests, 2 failures diff --git a/slices/002-streamable-http/logs/mutation-round7.txt b/slices/002-streamable-http/logs/mutation-round7.txt deleted file mode 100644 index a1135b90..00000000 --- a/slices/002-streamable-http/logs/mutation-round7.txt +++ /dev/null @@ -1,46 +0,0 @@ -### Round 7 -- the anchors scored by mutation, on the tree that ships. -### -### The round-6 version of this file was headed 'on the tree that ships' and was scored at -### 136 tests. The shipping tree was 137: the same commit added a test to -### readme_claims_test.exs after the table was produced. All five mutants did die -- only the -### label was false -- but a table that names the wrong tree cannot be re-derived, so it is -### re-run here. Round 7 lane v1 found it. -### -### Each mutant is applied to lib/, compiled --warnings-as-errors --force first so a compiler -### kill is never scored as a test kill, then measured with mix test. - -BASELINE: -138 tests, 0 failures - ---- M8 --- -mutant: mirrored_params/2 swallows the host fault to %{} -138 tests, 2 failures - ---- M6 --- -mutant: check_param_headers/4 loses its fault case -138 tests, 2 failures - ---- M2 --- -mutant: fault_response/4 always re-raises (the bodyless-500 shape) -138 tests, 1 failure - ---- M3 --- -mutant: host_call/1 loses its catch (throw/exit lose the id) -138 tests, 1 failure - ---- M4 --- -mutant: authorize/2 loses its fault clause -138 tests, 2 failures - ---- M13 --- -mutant: annotations/1 moved INSIDE host_call/1 (reroutes the data fault) -138 tests, 1 failure - ---- M13_M2 --- -mutant: M13 ... -mutant: ... plus fault_response/4 always re-raises -138 tests, 1 failure - ---- M10full --- -mutant: consumers relax the module tag (width kept) -138 tests, 1 failure diff --git a/slices/002-streamable-http/logs/mutation.md b/slices/002-streamable-http/logs/mutation.md deleted file mode 100644 index de11fd84..00000000 --- a/slices/002-streamable-http/logs/mutation.md +++ /dev/null @@ -1,153 +0,0 @@ -# Round 2 — mutation evidence for the header-read sweep - -Ran in a copy, not the worktree: `$SCRATCH/mut/base`, a `cp -a` of the worktree with `_build` -and `.git` removed. Baseline there before and after the run: **98 tests, 0 failures**. - -Harness: for each mutant, assert the pattern occurs exactly once, apply, assert the mutated -text occurs exactly once, run `mix test`, record failures **by test name**, restore. A mutant -whose pre-count is not 1 is reported as NOT APPLIED, never as a survivor. (SCR-259: a mutation -that never landed is discarded, not scored.) - -## How the set of header reads was derived - -Not listed — derived, and the derivation is repeatable: - - grep -n 'get_req_header\|req_headers' lib/beam_mcp/transport/http.ex - -returns exactly three lines: the definition of `header_values/2`, the one call to it inside -`check_origin/2`, and the `mcp-param-` prefix sweep in `check_param_headers/3`. Every header -this module reads therefore goes through `header_values/2` or the sweep, and every comparison -is `Enum.all?` over all values. A fourth header added later inherits the behaviour instead of -needing a fifth finding. - -One honest qualification: `check_origin/2` compares with `Enum.all?(origins, &(&1 in allowed))` -rather than `all_match?/2`, because its comparison is set membership against the host's allow -list, not equality against a body value. It reads through the same helper and applies the same -all-values rule; it does not share the comparison function, and its own mutant below is what -pins it. - -## Mutants — one per header read - -| # | mutant | result | killed by | -|---|--------|--------|-----------| -| 1 | `Origin`: `Enum.all?(origins, …)` → `Enum.all?(Enum.take(origins, 1), …)` | KILLED 1/98 | `Origin — a second, disallowed Origin is not ignored` | -| 2 | `MCP-Protocol-Version`: `header_values(…)` → `Enum.take(header_values(…), 1)` | KILLED 1/98 | `MCP-Protocol-Version — a second, unsupported version is not ignored` | -| 3 | `Mcp-Method`: call site → first-value-only variant | KILLED 1/98 | `Mcp-Method — a second, disagreeing method is not ignored` | -| 4 | `Mcp-Name`: call site → first-value-only variant | KILLED 1/98 | `Mcp-Name — a second, disagreeing name is not ignored` | -| 5 | `Mcp-Param-{Name}`: call site → first-value-only variant | KILLED 1/98 | `Mcp-Param-{Name} — a second, disagreeing value is not ignored` | - -Mutants 3–5 mutate one call site each and add a scaffold function that drops all but the first -value of the named header. Each kills exactly one test, and a different one. That is the point -of running five mutants rather than one: a single shared mutant killed by a single test would -leave the other four reads unpinned while looking green. - -## Mutants — the class, and the two MUSTs added this round - -| # | mutant | result | killed by | -|---|--------|--------|-----------| -| 6 | `all_match?/2`: `Enum.all?` → `Enum.any?` | KILLED 3/98 | the `Mcp-Method`, `Mcp-Name` and `Mcp-Param-{Name}` multi-value tests | -| 7 | `check_param_headers/3` sweep disabled (validates nothing) | KILLED 3/98 | the multi-value param test and both `x-mcp-header` contract tests | -| 8 | `decode_header_value/1` base64 clause made unreachable | KILLED 1/98 | `an RFC-2047-style Base64 Mcp-Name is decoded before comparison` | -| 9 | 404 keyed on the `-32601` code again (attribute removed with it) | KILLED 1/98 | `an unknown tool is 200 with a JSON-RPC error, not 404` | - -Mutant 6 kills three, not five: `Origin` and `MCP-Protocol-Version` do not route their -comparison through `all_match?/2` (membership, and a second supported-version check, respectively), -so they survive it and are pinned by mutants 1 and 2 instead. Reported rather than smoothed over, -because "the class mutant killed everything" would have been the false version of this table. - -Mutant 9's first form changed only the `case` pattern and left `@method_not_found` defined but -unused, which `--warnings-as-errors` rejected: the mutant did not compile, so the suite never -ran and a compiler kill would have been scored as a test kill. Removing the attribute in the same -mutant made it a faithful revert; it then failed one test. Recorded because a mutant killed by -the compiler is not evidence that a test pins the behaviour. - -## What still has no mutant - -The multi-`Origin` fix landed in round 1 with no test at all — `Enum.all?` → `Enum.any?` survived -82/82. That is the finding this whole table answers: the fix was right and unpinned, so nothing -would have caught its removal. Mutant 1 is now the pin. - -## Second batch — the crash class (r2's R2-1 and R2-2) - -Same harness, same copy, baseline **101 tests, 0 failures** before and after. - -| # | mutant | result | killed by | -|---|--------|--------|-----------| -| 10 | outer `rescue`/`catch` removed from `call/2` (and `crash_response/1` with it — the pre-round-2 state) | KILLED 1/101 | `a host authorize/1 that raises, throws or exits is answered, not left as a bare 500` | -| 11 | `param/2` fallback removed, so a non-map `"params"` is reached into | KILLED 1/101 | `a non-map params is refused, not reached into` | -| 12 | refusal message interpolates the raw body value again | KILLED 1/101 | `a non-scalar params.name is refused, not interpolated into a message` | -| 13 | `to_comparable/1` catch-all removed (`:unmatchable` → the value itself) | **SURVIVED**, and equivalent | — | - -Two of these need saying rather than tabulating. - -**Mutant 13 survived and I am not adding a test to kill it, because it is an equivalent mutant.** -Returning the raw value instead of `:unmatchable` still fails the comparison — a map never equals -a header string — so behaviour is identical. The clause looked like the protection and is not: -what actually stopped the crash was removing the body value from the refusal message, which is -mutant 12, and that one dies. Recording a survivor as equivalent with the argument for why is the -honest form; the alternative was writing a test that asserts an implementation detail so the table -could read all-killed. - -**Mutant 10 was killed by one test, not two.** The latin-1 `Mcp-Name` test passes with the outer -rescue and without it: `Plug.Test` builds the conn in-process, so it does not reproduce the -socket-level failure the lane measured, where that request got **no response at all**. That test -documents the case; it does not pin it. The pin is the `authorize/1` crash test, and the socket -evidence stays the lane's. - -Mutant 10 also needed `crash_response/1` deleted in the same mutation, for the same reason as -mutant 9: left behind it is an unused function, `--warnings-as-errors` rejects the build, and a -compiler kill would have been scored as a test kill. - -## Note on `dispatch/3`'s inner rescue - -It is now inside `call/2`'s and looks redundant. It is kept because it is not: it answers with -`message["id"]`, which is known by then, while `crash_response/1` answers with `id: nil` because a -crash before decoding has no id to use. Removing it would silently downgrade every dispatch-time -crash to an unidentifiable error response. - -## Corrections to the round-2 table above - -Two things in this file were wrong, both found by round 3, and both are the kind that make a -record read as stronger evidence than it is. They are corrected here rather than edited away. - -**"One mutant per header read" was one mutant per header NAME.** `compare_versions/3` performs -*two* value comparisons on `MCP-Protocol-Version` — one against the body's `_meta`, one against -the supported set — and mutant 2 pinned only the first. A first-value-only mutant on the second -comparison **survived the entire suite**, and that branch is the only version check that runs on -a body carrying no `_meta`, which is every request that does not declare its era in the body. So -the round-2 headline was false in exactly the way the round-2 finding was: a set counted by the -names I had in mind rather than by what the code does. Round 3 makes both comparisons read every -value and pins the second one directly (mutant 18). - -**The derivation grep was misreported.** This file and the code comment both said -`grep -n 'get_req_header'` returns "only `header_values/2` and the `mcp-param-` sweep". It does -not: the sweep does not call `get_req_header` at all — it reads `conn.req_headers` — and the grep -also matches the comment describing itself. The claim the argument actually needs is over two -patterns, `get_req_header\|req_headers`, and the honest statement of the result is: one -definition, one call site, one `req_headers` sweep, plus the comments that name them. A -completeness argument resting on a command whose output is quoted wrongly is not a completeness -argument. - -## Round 3 — mutants for the round-3 fixes - -Same harness and rules; baseline in the copy **126 tests, 0 failures** before and after. - -| # | mutant | result | killed by | -|---|--------|--------|-----------| -| 14 | status-aware rescue reverted (swallow every exception again) | KILLED 1/126 | `it is re-raised rather than answered as -32603` | -| 15 | Base64 sentinel decoded for every header again | KILLED 1/126 | `Mcp-Method is NOT decoded` | -| 16 | round-trip check dropped, non-canonical Base64 accepted | KILLED 1/126 | `a non-canonical Base64 encoding is not accepted as a second spelling` | -| 17 | mirrored-parameter population no longer read from the schema | KILLED **8**/126 | the eight `Mcp-Param` tests | -| 18 | second version comparison reads only the first value | KILLED 2/126 | both `two comparisons` tests | -| 19 | nested annotation paths not walked | KILLED 1/126 | `an annotated property at a nested path is read at that path` | -| 20 | omitted-but-present-in-body no longer refused | KILLED 1/126 | `a header the schema requires and the client omits is refused` | -| 21 | integer compared as a string again | KILLED 1/126 | `an integer parameter is compared numerically` | -| 22 | notification with a lying `Mcp-Method` accepted again | KILLED 1/126 | `a notification WITH a lying Mcp-Method is still refused` | -| 23 | `@removed_in_modern` emptied | KILLED 1/126 | `initialize, notifications/initialized and ping are all method-not-found` | - -**Mutant 17 needed three completions, not one.** Replacing the schema lookup orphaned the -`ToolCatalog` alias; removing that orphaned `annotations/1` and `annotations/2`. Each time, -`--warnings-as-errors` failed the build and the suite never ran, and each time the naive reading -of that is a kill. This is the third instance of the compiler-kill family in this slice, and it is -now a rule in `CONVENTIONS.md`. The completed mutant is killed by **eight** tests — the strongest -kill in the table, and it would have been recorded as a one-line compile failure. diff --git a/slices/002-streamable-http/logs/probe-docs-gate.txt b/slices/002-streamable-http/logs/probe-docs-gate.txt deleted file mode 100644 index fd6f67c3..00000000 --- a/slices/002-streamable-http/logs/probe-docs-gate.txt +++ /dev/null @@ -1,86 +0,0 @@ -### PROBE: the gate's docs step, shown failing on the defect it exists for, then green. -### -### CAPTURED WHOLE. The previous version of this file was piped through grep, so when the -### restored run exited 1 -- credo was red on nested-module test fixtures, fixed later in -### the same commit -- the filter hid the credo FAIL line and the archive showed a PASSING -### docs step beside a FAILING exit code, with nothing explaining it. That is the -### read-the-step-line-not-the-exit-code confusion inverted, inside the file offered as -### proof, and a filtered transcript is not a verbatim archive. Round 7 lane v1 found it. -### -### mix docs reads compiled beams, so the probe edits the source and recompiles rather than -### planting a string. - -MUTATION: BeamMCP.Transport.Stdio reverted to @moduledoc false - -========== GATE, with the moduledoc reverted ========== -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs FAIL (exit 0, 6 warnings) - Generating docs... - warning: documentation references module "BeamMCP.Transport.Stdio" but it is hidden - │ - 176 │ - **`BeamMCP.Transport.Stdio` was documented.** It carried `@moduledoc false` — inherited from - │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - │ - └─ CHANGELOG.md:176: (file) - - warning: documentation references function "BeamMCP.Transport.Stdio.run/1" but it is hidden - │ - 97 │ **stdio** — `BeamMCP.Transport.Stdio.run/1`, newline-delimited JSON-RPC over a pipe. - │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - │ - └─ README.md:97: (file) - - warning: documentation references module "BeamMCP.Transport.Stdio" but it is hidden - │ - 383 │ `BeamMCP.Transport.Stdio`, `BeamMCP.Schema`, `BeamMCP.ToolSpec` (`083838e`). - │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - │ - └─ CHANGELOG.md:383: (file) - - warning: documentation references function "BeamMCP.Transport.Stdio.run/1" but it is hidden - │ - 97 │ **stdio** — `BeamMCP.Transport.Stdio.run/1`, newline-delimited JSON-RPC over a pipe. - │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - │ - └─ README.md:97: (file) - - warning: documentation references module "BeamMCP.Transport.Stdio" but it is hidden - │ - 176 │ - **`BeamMCP.Transport.Stdio` was documented.** It carried `@moduledoc false` — inherited from - │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - │ - └─ CHANGELOG.md:176: (file) - - warning: documentation references module "BeamMCP.Transport.Stdio" but it is hidden - │ - 383 │ `BeamMCP.Transport.Stdio`, `BeamMCP.Schema`, `BeamMCP.ToolSpec` (`083838e`). - │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - │ - └─ CHANGELOG.md:383: (file) - - View html docs at "doc/index.html" - View markdown docs at "doc/llms.txt" - View epub docs at "doc/BeamMCP.epub" - reuse pass (24 commentable files) -GATE FAILED. -GATE_EXIT=1 - -MUTATION REVERTED - -========== GATE, restored ========== -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/002-streamable-http/logs/probe-fault-ids.txt b/slices/002-streamable-http/logs/probe-fault-ids.txt deleted file mode 100644 index ee83d915..00000000 --- a/slices/002-streamable-http/logs/probe-fault-ids.txt +++ /dev/null @@ -1,104 +0,0 @@ -### Which limbs echo the request id, measured rather than reasoned. -### Written by the command that produced it: mix run on the probe archived below the table. -### Round 7 asked for this because the round-6 CHANGELOG note said only the authorize/1 limb -### answers id:null, and the malformed-spec limb does too. - -row status code id - -16:42:14.112 [error] ** (Plug.BadRequestError) could not process the request due to client error - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:42: anonymous fn/3 in :elixir_compiler_2.__FILE__/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:34: P.run/2 - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:42: (file) - - host tool raises (dispatch/3) 500 -32603 id=4242 - host tool_catalog RAISES (header validation) 500 -32603 id=4242 - -16:42:14.115 [error] ** (Plug.BadRequestError) could not process the request due to client error - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:15: P.Raises.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - - -16:42:14.121 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:583: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:34: P.run/2 - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:44: (file) - (elixir 1.19.2) src/elixir_compiler.erl:81: :elixir_compiler.dispatch/4 - - host tool_catalog returns a malformed spec 500 -32603 id=nil - -16:42:14.121 [error] ** (Plug.BadRequestError) could not process the request due to client error - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:45: anonymous fn/1 in :elixir_compiler_2.__FILE__/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:34: P.run/2 - /tmp/claude-1000/-home-aylac-Projects-beam-mcp/9002f99b-20c3-473b-941a-77eb49689506/scratchpad/id_probe.exs:45: (file) - (elixir 1.19.2) src/elixir_compiler.erl:81: :elixir_compiler.dispatch/4 - - host authorize/1 raises 500 -32603 id=nil - -### The probe: - defmodule P do - import Plug.Test - import Plug.Conn - @hdr "mcp-protocol-version" - @modern "2026-07-28" - - defmodule Good do - @behaviour BeamMCP.ToolCatalog - @impl true - def all, do: [%BeamMCP.ToolSpec{name: :echo, command_class: :observe, mode: :read_only, description: "e."}] - end - defmodule Raises do - @behaviour BeamMCP.ToolCatalog - @impl true - def all, do: raise(Plug.BadRequestError) - end - defmodule BadSpec do - @behaviour BeamMCP.ToolCatalog - @impl true - def all, do: [%{name: :echo}] - end - - def run(label, o) do - body = %{"jsonrpc" => "2.0", "id" => 4242, "method" => "tools/call", - "params" => %{"name" => "echo", "arguments" => %{}}, - "_meta" => %{"io.modelcontextprotocol/protocolVersion" => @modern}} - conn = - :post - |> conn("/mcp", Jason.encode!(body)) - |> put_req_header("content-type", "application/json") - |> put_req_header(@hdr, @modern) - |> put_req_header("mcp-method", "tools/call") - |> put_req_header("mcp-name", "echo") - |> BeamMCP.Transport.HTTP.call(BeamMCP.Transport.HTTP.init(o)) - d = Jason.decode!(conn.resp_body) - IO.puts(" #{String.pad_trailing(label, 46)} #{conn.status} #{d["error"]["code"]} id=#{inspect(d["id"])}") - end - end - - base = [authorize: fn _ -> :ok end, allowed_origins: :any] - IO.puts("row status code id") - P.run("host tool raises (dispatch/3)", base ++ [tool_catalog: P.Good, dispatch: fn _,_,_ -> raise Plug.BadRequestError end]) - P.run("host tool_catalog RAISES (header validation)", base ++ [tool_catalog: P.Raises, dispatch: fn _,a,_ -> {:ok, a} end]) - P.run("host tool_catalog returns a malformed spec", base ++ [tool_catalog: P.BadSpec, dispatch: fn _,a,_ -> {:ok, a} end]) - P.run("host authorize/1 raises", [allowed_origins: :any, tool_catalog: P.Good, dispatch: fn _,a,_ -> {:ok, a} end, authorize: fn _ -> raise Plug.BadRequestError end]) diff --git a/slices/002-streamable-http/logs/red-host-exception-envelope.txt b/slices/002-streamable-http/logs/red-host-exception-envelope.txt deleted file mode 100644 index 9691583b..00000000 --- a/slices/002-streamable-http/logs/red-host-exception-envelope.txt +++ /dev/null @@ -1,157 +0,0 @@ -Running ExUnit with seed: 503679, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........ -15:25:37.029 [info] beam_mcp: refused by host authorize/1: :nope -... -15:25:37.090 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -15:25:37.093 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1050: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1053: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -15:25:37.100 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host tool's exception is answered in the envelope even when it carries a status (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1021 - ** (Plug.BadRequestError) could not process the request due to client error - code: conn = post(body, call_headers([]), o) - stacktrace: - test/beam_mcp/transport/http_test.exs:1028: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool's exception is answered in the envelope even when it carries a status"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1031: (test) - -....... -15:25:37.155 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -15:25:37.258 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -15:25:37.314 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:25:37.314 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:25:37.315 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:25:37.315 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:25:37.316 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -15:25:37.369 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1039: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1040: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -Finished in 0.8 seconds (0.8s async, 0.00s sync) -77 tests, 1 failure diff --git a/slices/002-streamable-http/logs/red-host-population.txt b/slices/002-streamable-http/logs/red-host-population.txt deleted file mode 100644 index f1457424..00000000 --- a/slices/002-streamable-http/logs/red-host-population.txt +++ /dev/null @@ -1,184 +0,0 @@ -Running ExUnit with seed: 186102, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.. -15:50:07.500 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:50:07.502 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -15:50:07.555 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1097: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1100: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -15:50:07.559 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -15:50:07.566 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:50:07.566 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1026 - ** (Plug.BadRequestError) could not process the request due to client error - code: conn = post(body, call_headers([]), o) - stacktrace: - test/beam_mcp/transport/http_test.exs:1033: BeamMCP.Transport.HTTPTest.RaisingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:513: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:473: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1039: (test) - -.............. -15:50:07.671 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1086: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1087: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -15:50:07.672 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -15:50:07.723 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -15:50:07.782 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:50:07.782 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:50:07.782 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:50:07.783 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1075: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool's exception is answered in the envelope even when it carries a status"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:735: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1078: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool's exception is answered in the envelope even when it carries a status"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. - - 2) test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1009 - ** (Plug.BadRequestError) could not process the request due to client error - code: conn = post(body, call_headers([]), o) - stacktrace: - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: (test) - -..................... -Finished in 0.7 seconds (0.7s async, 0.00s sync) -79 tests, 2 failures diff --git a/slices/002-streamable-http/logs/red-integer-comparison.txt b/slices/002-streamable-http/logs/red-integer-comparison.txt deleted file mode 100644 index 98e3d572..00000000 --- a/slices/002-streamable-http/logs/red-integer-comparison.txt +++ /dev/null @@ -1,188 +0,0 @@ -Running ExUnit with seed: 859413, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.. -15:23:29.111 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:23:29.112 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:23:29.112 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -15:23:29.167 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1033: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1036: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -15:23:29.169 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an integer body value is compared as an integer, not through a float a header naming a different integer above 2^53 is refused (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1103 - Assertion with == failed - code: assert conn.status == 400 - left: 200 - right: 400 - stacktrace: - test/beam_mcp/transport/http_test.exs:1114: (test) - -....... -15:23:29.224 [error] ** (ArithmeticError) bad argument in arithmetic expression - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:416: BeamMCP.Transport.HTTP.value_matches?/2 - (elixir 1.19.2) lib/enum.ex:4312: Enum.predicate_list/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:618: BeamMCP.Transport.HTTP.compare_versions/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:435: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1097: BeamMCP.Transport.HTTPTest."test an integer body value is compared as an integer, not through a float a body integer beyond the float range is refused, not crashed into a 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 2) test an integer body value is compared as an integer, not through a float a body integer beyond the float range is refused, not crashed into a 500 (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1083 - Assertion with == failed - code: assert conn.status == 400 - left: 500 - right: 400 - stacktrace: - test/beam_mcp/transport/http_test.exs:1099: (test) - -..... -15:23:29.329 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:23:29.329 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -15:23:29.331 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -15:23:29.331 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -15:23:29.382 [info] beam_mcp: refused by host authorize/1: :nope - - - 3) test an integer body value is compared as an integer, not through a float a header that is not a numeric literal does not match an integer body value (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1129 - "+42" is not a spelling of 42 and must not match it - code: for header <- ["0x2A", " 42", "42 ", "4_2", "", "42abc", "+42"] do - stacktrace: - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:1132: (test) - -............. -15:23:29.434 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1022: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1023: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -15:23:29.441 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:685: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:656: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -Finished in 0.6 seconds (0.6s async, 0.00s sync) -76 tests, 3 failures diff --git a/slices/002-streamable-http/logs/red-leading-zeros.txt b/slices/002-streamable-http/logs/red-leading-zeros.txt deleted file mode 100644 index 2fa7037b..00000000 --- a/slices/002-streamable-http/logs/red-leading-zeros.txt +++ /dev/null @@ -1,183 +0,0 @@ -Running ExUnit with seed: 801001, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.... -15:51:57.093 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -15:51:57.096 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -15:51:57.200 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:779: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:710: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:51:57.200 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:779: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:710: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -15:51:57.202 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:752: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:51:57.202 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:752: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:51:57.202 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:752: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -15:51:57.212 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:752: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -15:51:57.213 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:779: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:710: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -15:51:57.318 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1067: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:779: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:710: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1068: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -15:51:57.324 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1033: BeamMCP.Transport.HTTPTest.RaisingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:752: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:563: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:516: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:477: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1039: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -15:51:57.380 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:779: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:710: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -15:51:57.380 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1078: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:779: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:710: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1081: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an integer body value is compared as an integer, not through a float a header that is not a numeric literal does not match an integer body value (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1174 - "042" is not a spelling of 42 and must not match it - code: for header <- ["0x2A", "4_2", "", "42abc", "+42", "042", "0042", "00000000000000042"] do - stacktrace: - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:1184: (test) - -......... -15:51:57.432 [info] beam_mcp: refused by host authorize/1: :nope -...... -Finished in 0.7 seconds (0.7s async, 0.00s sync) -77 tests, 1 failure diff --git a/slices/002-streamable-http/logs/red-no-cacheable-fields.txt b/slices/002-streamable-http/logs/red-no-cacheable-fields.txt deleted file mode 100644 index 945ba938..00000000 --- a/slices/002-streamable-http/logs/red-no-cacheable-fields.txt +++ /dev/null @@ -1,12 +0,0 @@ -### RED 2: does a 2026-07-28 tools/list carry the fields that revision REQUIRES? -### The requirement, quoted from the archived spec (logs/spec-changelog.md): -### "Require `ttlMs` and `cacheScope` fields on results returned by `tools/list`, -### ... via a new `CacheableResult` interface." - -tools/list at 2026-07-28, result keys: - _meta - resultType - tools - - ttlMs present? false - cacheScope present? false diff --git a/slices/002-streamable-http/logs/red-no-endpoint.txt b/slices/002-streamable-http/logs/red-no-endpoint.txt deleted file mode 100644 index 0a9ba21c..00000000 --- a/slices/002-streamable-http/logs/red-no-endpoint.txt +++ /dev/null @@ -1,23 +0,0 @@ -### RED 1: is there an HTTP endpoint in this package today? -### Asked of the tree, not of memory. - ---- every module the package ships --- -lib/beam_mcp: -schema.ex -server.ex -tool_catalog.ex -tool_spec.ex -transport - -lib/beam_mcp/transport: -stdio.ex - ---- any Plug, Bandit, or HTTP dependency? --- - none in mix.exs deps - ---- anything answering HTTP anywhere in lib/? --- - no HTTP-serving code in lib/ - ---- so: a client POSTing to /mcp reaches nothing. Demonstrated by asking the ---- package for the module the spec's transport would live in: - Code.ensure_loaded?(BeamMCP.Transport.HTTP) -> false diff --git a/slices/002-streamable-http/logs/red-required-options.txt b/slices/002-streamable-http/logs/red-required-options.txt deleted file mode 100644 index 3c237f39..00000000 --- a/slices/002-streamable-http/logs/red-required-options.txt +++ /dev/null @@ -1,12 +0,0 @@ -### RED 3 / GREEN 3: wiring the Plug without the required options must fail AT INIT, -### not at request time. This is the "inescapable, not documented" contract: a host -### cannot start without deciding who may call and which origins are legitimate. - - no :authorize, no :allowed_origins - -> ArgumentError at init: BeamMCP.Transport.HTTP requires an :authorize option, and it has no default. - only :allowed_origins - -> ArgumentError at init: BeamMCP.Transport.HTTP requires an :authorize option, and it has no default. - only :authorize - -> ArgumentError at init: BeamMCP.Transport.HTTP requires an :allowed_origins option, and it has no default. - both supplied - -> INITIALISED (no failure) diff --git a/slices/002-streamable-http/logs/resilience.txt b/slices/002-streamable-http/logs/resilience.txt deleted file mode 100644 index f56fcbf0..00000000 --- a/slices/002-streamable-http/logs/resilience.txt +++ /dev/null @@ -1,14 +0,0 @@ -### RESILIENCE: measured against a real Bandit listener on 127.0.0.1, not the Plug alone. -### Each row is a command and its observed result. Re-run after the two fixes the first -### pass found: a host dispatch crash answering with an empty 500, and a 413 poisoning the -### next request on a keep-alive connection. - -before crash: %{active: 1, workers: 0, supervisors: 1, specs: 1} -baseline: {200, "{\"id\":1,\"jsonrpc\":\"2.0\",\"result\":{\"_meta\":{\"io.modelcontextprotocol/serverInfo\":{\"name\":\"beam_mcp\",\"version\":\"0.3.0\"}},\"cacheScope\":\"private\",\"resultType\":\"complete\",\"tools\":[{\"annotations\":{\"destructiveHint\":false,\"idempotentHint\":true,\"openWorldHint\":false,\"readOnlyHint\":true},\"description\":\"Always raises.\",\"inputSchema\":{\"additionalProperties\":true,\"properties\":{},\"type\":\"object\"},\"name\":\"boom\"}],\"ttlMs\":0}}"} -dispatch RAISES: {500, "{\"error\":{\"code\":-32603,\"message\":\"Internal error\"},\"id\":2,\"jsonrpc\":\"2.0\"}"} -after crash: %{active: 1, workers: 0, supervisors: 1, specs: 1} -next request: {200, "{\"id\":1,\"jsonrpc\":\"2.0\",\"result\":{\"_meta\":{ -oversized: {413, "{\"error\":{\"code\":-32600,\"message\":\"Request bod -after oversized: %{active: 1, workers: 0, supervisors: 1, specs: 1} -next after 413 #1: {200, "{\"id\":1,\"jsonrpc\":\"2.0\",\"result\":{\"_meta\":{ -next after 413 #2: {200, "{\"id\":1,\"jsonrpc\":\"2.0\",\"result\":{\"_meta\":{ diff --git a/slices/002-streamable-http/logs/round1.r1.md b/slices/002-streamable-http/logs/round1.r1.md deleted file mode 100644 index b9511591..00000000 --- a/slices/002-streamable-http/logs/round1.r1.md +++ /dev/null @@ -1,353 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 002-streamable-http, round 1, correctness and conformance -Type: Report - -Tree read: `babfc5e40522288e49fb17475bab1765e83711fb` -(`cd /home/aylac/Projects/beam_mcp-wt/002-review1 && git write-tree`; also written to -`/home/aylac/Projects/beam_mcp-wt/002-review1/logs-r1.tree`) - -Scope: `lib/`, `test/`, `README.md`, `CHANGELOG.md`, `mix.exs`. All probes and mutations were run -against a copy at -`/tmp/claude-1000/-home-aylac-Projects-hacktui-hermes/775c8d71-6ac1-4653-8798-382001e76089/scratchpad/r1b/mut`, -never the review worktree; `diff -r --brief lib /lib` was re-run after every mutation and -reports IDENTICAL. - ---- - -## 1. BLOCKING — `0.3.0` does not compile for any consumer that does not itself depend on `plug` - -**file:line** `lib/beam_mcp/transport/http.ex:49-51`; `mix.exs:36-37`; claims at `README.md:97` -and `CHANGELOG.md:21`. - -`plug` is `optional: true`, so Mix does not install it into a consumer's tree. But -`lib/beam_mcp/transport/http.ex` is unconditionally compiled and does `import Plug.Conn` at -module level, which is a hard compile error when `Plug.Conn` is absent (`@behaviour Plug` alone -would only warn; the `import` will not). - -**Expected**: a stdio-only host adds `{:beam_mcp, "~> 0.3.0"}` and it compiles — this is exactly -what `README.md:97` ("`plug` and `bandit` are optional dependencies; a stdio-only host does not -pull them in") and `CHANGELOG.md:21` promise, and both ship in the Hex tarball. - -**Observed**: hard `CompileError`. Every existing `0.2.0` stdio consumer breaks on upgrade. - -``` -$ cat consumer/mix.exs # deps: [{:beam_mcp, path: ""}] -$ cd consumer && mix deps.get && mix compile -==> jason -Compiling 10 files (.ex) -Generated jason app -==> beam_mcp -Compiling 6 files (.ex) - error: module Plug.Conn is not loaded and could not be found - │ - 51 │ import Plug.Conn - │ ^ - │ - └─ lib/beam_mcp/transport/http.ex:51:3: BeamMCP.Transport.HTTP (module) - -== Compilation error in file lib/beam_mcp/transport/http.ex == -** (CompileError) lib/beam_mcp/transport/http.ex: cannot compile module BeamMCP.Transport.HTTP -``` - -`optional: true` controls *resolution*, not *compilation*. The module body must be guarded — -`if Code.ensure_loaded?(Plug) do … end` around the `defmodule`, or equivalent — and the guard -needs a check that actually builds the package with `plug` absent, because nothing in the current -suite can fail on this: `plug` is always present in this project's own dev/test tree. - -Note this is also a **false README claim in the shipped tarball**, and the `readme_claims_test` -mechanism did not catch it: the new HTTP claims were not added to its list, and its own moduledoc -(`test/beam_mcp/readme_claims_test.exs:9-14`) says it does not catch a claim added without a test. - ---- - -## 2. BLOCKING — `Mcp-Method` and `Mcp-Name` are neither required nor validated; the CHANGELOG claims otherwise - -**file:line** `lib/beam_mcp/transport/http.ex:210-251` (`check_protocol_header/2` is the only -header validation in the module); doc claim at `CHANGELOG.md:44-52`. - -**Spec** (`slices/002-streamable-http/logs/spec-streamable-http.md:288-294`, confirmed against the -live page): - -> | `Mcp-Method` | `method` | All requests | -> | `Mcp-Name` | `params.name` or `params.uri` | `tools/call`, `resources/read`, `prompts/get` requests | -> These headers are **REQUIRED** for compliance. - -and (`spec-streamable-http.md:583-600, 620-628`): - -> Servers that process the request body **MUST** reject requests where the values specified in -> the headers do not match the corresponding values in the request body. This prevents potential -> security vulnerabilities when different components in the network rely on different sources of -> truth (e.g., a load balancer routing on the header value while the MCP server executes based on -> the body value). -> … servers **MUST** return HTTP status `400 Bad Request` and **MUST** include a JSON-RPC error -> response using … `-32020` … Validation failure conditions include: A required standard header -> (`MCP-Protocol-Version`, `Mcp-Method`, `Mcp-Name`) is missing. - -This server processes the request body, so both MUSTs bind it. - -**Expected**: (A) a POST with no `Mcp-Method` → `400` / `-32020`. (B) a POST whose `Mcp-Method` -and `Mcp-Name` contradict the body → `400` / `-32020`, and dispatch is not reached. - -**Observed**: both accepted and executed. - -``` -$ MIX_ENV=test mix run probe_headers.exs -A observed: status=200 body={"id":1,...,"result":{...,"tools":[...]}} -B observed: status=200 body={"id":1,...,"result":{...,"content":[{"text":"{}","type":"text"}],"isError":false,...}} -B dispatch reached: {:dispatched, :echo} -``` - -Case B is the exact scenario the spec names: headers said `Mcp-Method: tools/list` / -`Mcp-Name: not_echo`, the body said `tools/call` / `echo`, and the server ran `echo`. An -intermediary routing or rate-limiting on the mirrored headers is authorising a different call from -the one executed. For a transport whose stated design principle is "a Plug that serves -`tools/call` to anyone who can reach the port is a confused-deputy surface" -(`http.ex:15-17`), this is the same class of defect one layer up. - -Separately, `CHANGELOG.md:44` introduces its table as "**What the transport enforces**, each a MUST -of the transport specification". The table omits the two REQUIRED headers entirely, so a consumer -reading the shipped changelog is told the transport's MUST coverage is complete when it is not. - ---- - -## 3. BLOCKING — an unimplemented RPC method answers `200`; the spec requires `404` with `-32601` - -**file:line** `lib/beam_mcp/transport/http.ex:285-288`. - -**Spec** (`spec-streamable-http.md:271-275`, confirmed live): - -> If the server does not implement the requested RPC method, it **MUST** respond with -> `404 Not Found` and a JSON-RPC error with code `-32601` (`Method not found`). The JSON-RPC error -> body distinguishes this case from a `404` returned by a legacy HTTP+SSE server… - -`do_dispatch/3` maps any non-`nil` response to `200`, so the `-32601` that -`lib/beam_mcp/server.ex:234-236` already produces never reaches the wire with the right status. - -**Observed**: - -``` -C observed: status=200 body={"error":{"code":-32601,"message":"Method not found: resources/list"},"id":1,"jsonrpc":"2.0"} -``` - -**Expected**: `404` with that same body. This is load-bearing for interop, not cosmetic: the -Backward Compatibility section (`spec-streamable-http.md:645-660`) has clients switch on -`400/404/405` + body shape to decide whether to fall back to the legacy transport. A modern -`-32601` returned as `200` is invisible to that algorithm. - ---- - -## 4. MEDIUM — a missing `MCP-Protocol-Version` is answered `-32600`; the spec requires `-32020` - -**file:line** `lib/beam_mcp/transport/http.ex:216-222`; the test that pins it, -`test/beam_mcp/transport/http_test.exs:111-116`, asserts only the status and the message string, -so it cannot notice. - -**Spec**: a missing `MCP-Protocol-Version` is listed under *Validation failure conditions* -(`spec-streamable-http.md:620-622`), and those MUST use `-32020` (`:596-602`). - -**Observed**: - -``` -MISSING-HEADER status=400 body={"error":{"code":-32600,"message":"Missing mcp-protocol-version header; it is required on every POST to this endpoint"},"id":7,"jsonrpc":"2.0"} -``` - -The status is right; the code is not. A conforming client keys off `HeaderMismatch` to re-derive -its headers and retry (`spec-streamable-http.md:541-546`); `-32600` gives it nothing to key off. -The module already gets this right for the *mismatch* case one branch below, which makes the -inconsistency more likely to be an oversight than a decision. - ---- - -## 5. MEDIUM — the `403` body reflects the host's `authorize` failure term back to an unauthenticated caller - -**file:line** `lib/beam_mcp/transport/http.ex:132-133`: - -```elixir -{:error, reason} -> - send_json(conn, 403, error(nil, -32_600, "Forbidden: #{inspect(reason)}")) -``` - -The module states the opposite policy 130 lines later, for the crash path -(`http.ex:261-264`): "answer with a JSON-RPC internal error carrying NO detail… Leaking -`Exception.message/1` to an HTTP caller would hand an unauthenticated party the host's internals." -`CHANGELOG.md:80` ships that as a headline. The same argument applies here and more strongly: the -`authorize` reason is produced by the host's identity code, at the one point in the request where -the caller is known *not* to be authorised. - -**Observed** (host returns `{:error, {:bad_token, "db-conn-string://user:p4ssw0rd@internal-host/db"}}`): - -``` -authorize refusal: status=403 body={"error":{"code":-32600,"message":"Forbidden: {:bad_token, \"db-conn-string://user:p4ssw0rd@internal-host/db\"}"},"id":null,"jsonrpc":"2.0"} -``` - -**Expected**: a fixed `"Forbidden"`, with `reason` going to `Logger` as the crash path does. -The package documents that it "never inspects what [authorize] does" (`http.ex:23`) — it should -not serialise it to the network either. - ---- - -## 6. MEDIUM — the 1 MiB body cap and the 413 keep-alive fix have **no test**; three mutations survive, and the CHANGELOG's measurement does not reproduce - -**file:line** `lib/beam_mcp/transport/http.ex:61-64, 164-186`; claims at `CHANGELOG.md:83-87`. - -Mutation scoring. Every mutant was applied with an asserted before/after count, compiled with -`mix compile --force` (a `mv`-based restore preserves mtimes and silently leaves a stale mutant in -`_build` — this bit me mid-review and every result below was re-derived after a forced rebuild), -and each survivor is additionally proven **by effect** against a real Bandit listener on -`127.0.0.1:4599`. - -| mutant | applied | suite | verdict | -|---|---|---|---| -| M11 `413,` → `200,` | old 1→0, new 1 | 71 tests, 0 failures | **SURVIVOR** | -| M12 `read_body(conn, length: @max_body_bytes)` → `read_body(conn)` | old 1→0, new 1 | 71 tests, 0 failures | **SURVIVOR** | -| M6 drop `put_resp_header("connection", "close")` | occurrences 1→0 | 71 tests, 0 failures | **SURVIVOR** | - -Effect proof for M11 — the live server answered an oversized body `200 OK` while the suite stayed -green: - -``` -APPLIED: old '413,' count now 0 ; new '200,' count now 1 ---- effect proof: real Bandit, oversized body under the mutant --- -6 oversized (413) : HTTP/1.1 200 OK ---- suite under the mutant --- -71 tests, 0 failures -``` - -Effect proof for M6, which also raises a second point: - -``` -APPLIED: 'connection, close' occurrences now 0 -6 oversized (413) : HTTP/1.1 413 Request Entity Too Large -7 next after 413 : HTTP/1.1 200 OK ---- suite under the mutant --- -71 tests, 0 failures -``` - -Two things follow. First, the whole oversized-body path — cap, status, and the connection close — -is unpinned; `slices/002-streamable-http/logs/resilience.txt` *demonstrates* it but nothing -*guards* it, which is the distinction the project's own -`test/beam_mcp/readme_claims_test.exs:87-90` insists on for the `files:` change. - -Second, I could not reproduce the failure `CHANGELOG.md:83-85` says motivated the fix ("Measured: -`413`, then a **timeout**, then a success"). With `connection: close` removed, the request after the -413 returned `200 OK` immediately on the same socket (row 7 above); with it present, that request -fails `:closed`. So on this measurement the header is not recovering a broken connection — it is -tearing down one that worked. I am not asserting the original measurement was wrong; my client is a -raw `:gen_tcp` socket sending a 1.2 MB body in one write, which may differ from theirs. But a -behavioural claim in a shipped `CHANGELOG.md` that a reviewer cannot reproduce needs either the -reproducing command archived beside it or the claim narrowed. - ---- - -## 7. LOW — `ttlMs`/`cacheScope` are pinned only through the HTTP transport, and the "both eras" decision is untested - -**file:line** `lib/beam_mcp/server.ex:183-195`; tests, or their absence, in -`test/beam_mcp/server_test.exs`. - -``` -$ grep -rn "ttlMs\|cacheScope\|tools_ttl\|tools_cache" test/ | grep -v transport/http_test -(no output) -``` - -Killing M17 (`"ttlMs"` → `"ttlMsX"`) fails only `BeamMCP.Transport.HTTPTest`. SCR-261 is a change to -`Server.handle_message/2`, reachable from stdio as well, and nothing in `server_test.exs` or -`negotiation_test.exs` asserts it. If the transport were removed tomorrow the requirement would be -silently unpinned; and the fields are, today, unasserted on the stdio path that is this package's -primary transport. - -In particular the design decision the comment at `server.ex:185-188` defends — emitting at *both* -eras — has no test. **The claim itself checks out**, so this is coverage, not a defect: - -* `slices/.../logs/spec-legacy-basic.md:73` — "The `result` **MAY** follow any JSON object - structure." Emitting extra keys at `2025-11-25` is permitted. -* Behaviour confirmed: `legacy 2025-11-25 tools/list result: %{"cacheScope" => "private", - "tools" => [], "ttlMs" => 0}` and the same for a bare no-`_meta` request. - ---- - -## 8. LOW — `init/1` validates two options and not `:tool_catalog`, which `Server.new/1` `fetch!`es - -**file:line** `lib/beam_mcp/transport/http.ex:70-114`. - -The stated contract is "a host that omits either gets an `ArgumentError` **when the Plug is -initialised**, not on the first request" (`http.ex:19-20`), and `http_test.exs:80-84` names it -"the failure is at init, not at request time". `:tool_catalog` is equally undefaultable — -`server.ex:87` does `Keyword.fetch!` — but is not checked at init: - -``` -init returned: [:authorize, :allowed_origins, :server_opts] -- no raise -first request: status=500 body={"error":{"code":-32603,"message":"Internal error"},"id":1,"jsonrpc":"2.0"} -``` - -A host that misspells `tool_catalog:` starts clean and 500s on every request, with the rescue at -`http.ex:267-272` swallowing the `KeyError` that would have named the cause. One `Keyword.has_key?` -in `init/1` closes it. - ---- - -## 9. LOW — the `405` carries no `Allow` header - -**file:line** `lib/beam_mcp/transport/http.ex:160-162`. - -RFC 9110 §15.5.6: "The origin server MUST generate an `Allow` header field in a 405 response -containing a list of the target resource's currently supported methods." - -``` -405 resp_headers=[{"cache-control", "max-age=0, private, must-revalidate"}, {"content-type", "application/json; charset=utf-8"}] -``` - -`Allow: POST` is one line. (The 405-for-GET/DELETE behaviour itself is right — see verified items.) - ---- - -## 10. LOW — `CHANGELOG.md:44` calls "POST only → 405" a MUST of the transport specification - -The spec makes *supporting POST* a server MUST (`spec-streamable-http.md:45-47`) and makes -`405` for GET/DELETE a **SHOULD**, in Backward Compatibility (`:676-681`). The row is good -behaviour described with the wrong modal in a document that ships to consumers. - ---- - -## Verified, no finding - -* **The archive is faithful.** I re-fetched - `https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http` and - compared it to `slices/002-streamable-http/logs/spec-streamable-http.md`. Every normative passage - I relied on (Security & Endpoint, Sending Messages, Protocol Version Header, Standard Request - Headers, Server Validation, Backward Compatibility) matches the archive. -* **Acceptance criterion 6 is met.** `handle_message/2` has **13 clauses at `bee3d26` and 13 at - `babfc5e`**; `lib/beam_mcp/server.ex` has exactly **3 hunks** — the `@type state()` fields, - `new/1`, and the `tools/list` clause. No other clause is touched. - (`git show :lib/beam_mcp/server.ex | grep -c "^ def handle_message"`; - `git diff … -- lib/beam_mcp/server.ex | grep -c "^@@"`.) -* **The cacheable-fields requirement is complete for this package.** `spec-changelog.md:38` requires - the fields on `tools/list`, `prompts/list`, `resources/list`, `resources/read`, - `resources/templates/list`; only `tools/list` exists here. -* **The remaining protocol behaviour is genuinely tested.** Killed with an asserted application - count and a forced rebuild: origin rejection (M1c), non-POST refusal (M13), missing-header - refusal (M3b), `-32020` (M4), `-32022` (M5), `authorize` being called at all (M8), `202` for - notifications (M9), no exception detail in the `500` (M10), non-permissive `cacheScope` default - (M14), `ttlMs` default (M15), host-supplied `ttlMs` reaching the result (M16), and both field - names (M17, M18). -* **Answering an error on the pre-`read_body` `conn`** — the `with`'s `else` branch uses the outer - `conn`, not the one `read_body_bounded/1` returned. Measured against real Bandit over one - keep-alive socket: ok `200`, HeaderMismatch `400`, ok `200`, bad-JSON `400`, ok `200`. No stale - adapter-state problem. -* **Legacy-era mechanisms are correctly ignored** — `Mcp-Session-Id` and `Last-Event-ID` are never - read; GET/DELETE/PUT/HEAD/OPTIONS/PATCH all get `405`, which is what - `spec-streamable-http.md:676-681` asks of a server that supports only this revision. -* **The gate passes, read line by line, not by exit code**: - `format pass · compile pass · test pass · credo pass · reuse pass (22 commentable files) · - licence files pass · Gate OK.` — `71 tests, 0 failures`. - -## Filed, not blocking (records) - -* `test/beam_mcp/readme_claims_test.exs:87` says "no release of this package before **0.2.1** - contained it", but the release adding `CHANGELOG.md` to `files:` is `0.3.0`. -* `mix.exs:22` `docs: [extras: ["README.md"]]` — `CHANGELOG.md` now ships in the tarball but is not - in the generated docs. - ---- - -VERDICT: changes required diff --git a/slices/002-streamable-http/logs/round1.r2.md b/slices/002-streamable-http/logs/round1.r2.md deleted file mode 100644 index 31bc3885..00000000 --- a/slices/002-streamable-http/logs/round1.r2.md +++ /dev/null @@ -1,357 +0,0 @@ -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 002-streamable-http, round 1, resilience and failure behaviour -Type: Report - -Tree reviewed: `babfc5e40522288e49fb17475bab1765e83711fb` -(`cd /home/aylac/Projects/beam_mcp-wt/002-review1 && git write-tree`; also written to -`/home/aylac/Projects/beam_mcp-wt/002-review1/logs-r2.tree`) - -## How I measured - -Everything below was re-derived, not read from `logs/resilience.txt`. A byte-identical copy of -`lib/`, `test/`, `mix.exs`, `deps/` and `_build/` was made under -`/tmp/claude-1000/.../scratchpad/r2b/probe` (`diff -r lib` → identical) and every probe ran -against that copy, never the review checkout's build tree. A real `Bandit` 1.12.5 listener on -`127.0.0.1:4711` served the Plug; clients were raw Python sockets (so keep-alive, partial writes -and lying `Content-Length` are under my control) and `curl` where a standard client mattered. - -The probe catalog declares `mode` and `n` as schema properties, because undeclared arguments are -dropped by `normalize_arguments/2` before dispatch — the trap that made the author's first -crash probe a silent no-op. **Proof the probe applies before any verdict is drawn from it:** - -``` -$ POST tools/call {"name":"echo","arguments":{"mode":"echoback"}} -HTTP/1.1 200 OK -{"result":{"structuredContent":{"mode":"echoback"}, ...}} -``` - -`mode` reaches dispatch and comes back. Only then were the crash modes scored. - -The package's own suite is green in the probe copy: `mix test` → **71 tests, 0 failures**. - ---- - -# 1. HIGH — every 400 answered *after* the body is read poisons the keep-alive connection; the client's next request is silently swallowed - -`lib/beam_mcp/transport/http.ex:117-135`, specifically the `else` clauses at `:126-134`. - -`with` clause bindings are not visible in `else`. Line 121 rebinds `conn` to the connection -`read_body_bounded/1` returned; lines 129-133 answer on the `conn` bound at line 117 — the -**pre-read** one, whose Bandit adapter state still believes the body is unread. Bandit then tries -to drain a body that has already been consumed, eats the *next* request's bytes as if they were -that body, and waits. - -The author's 413 fix at `:169-181` is not subject to this only because that branch returns -`{:halt, conn}`, carrying the updated conn out explicitly. The same workaround was not applied to -the other five error exits. - -**Reproduction with curl, two requests on one connection:** - -``` -$ curl -sS -m 8 -w 'req1 http=%{http_code} t=%{time_total}\n' -X POST http://127.0.0.1:4711/mcp \ - -H "content-type: application/json" --data-binary @big-nohdr.json \ - --next -sS -m 8 -w 'req2 http=%{http_code} t=%{time_total}\n' -X POST http://127.0.0.1:4711/mcp \ - -H "mcp-protocol-version: 2026-07-28" -H "content-type: application/json" \ - -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' - -curl: (28) Operation timed out after 8002 milliseconds with 0 bytes received -req1 http=400 t=0.001784 -req2 http=000 t=8.002756 -curl exit=28 -``` - -(`big-nohdr.json` is a 200 KB valid JSON object sent without the `MCP-Protocol-Version` header. -Identical result substituting a header mismatch.) - -**Full matrix, 200 KB body, second request on the same connection:** - -| req1 | when it answers | req1 status | next request | -|---|---|---|---| -| missing `MCP-Protocol-Version` | after read | 400 | **timeout** | -| header mismatch `-32020` | after read | 400 | **timeout** | -| unsupported version `-32022` | after read | 400 | **timeout** | -| invalid JSON `-32700` | after read | 400 | **timeout** | -| JSON not an object `-32600` | after read | 400 | **timeout** | -| disallowed `Origin` | before read | 403 | 200 OK | -| `authorize` refuses | before read | 403 | 200 OK | -| wrong method | before read | 405 | 200 OK | -| oversized body (413) | `{:halt, conn}` | 413 | 200 OK | -| rescued dispatch raise | inside `dispatch/3` | 500 | 200 OK | -| notification | inside `dispatch/3` | 202 | 200 OK | - -Note the direction: the slice brief guessed the risk was on the paths that answer *before* -reading. It is the exact opposite. The three pre-read paths are the safe ones — Bandit drains an -untouched body correctly — and it is the five post-read paths that break. - -**It is size-dependent, which is why it was not seen.** Bisected: a 1 KB body is fine (the whole -body arrived in Bandit's first socket read, so even the stale adapter has nothing outstanding); -16 KB and above hangs. Every entry in the author's `resilience.txt` and every case in -`test/beam_mcp/transport/http_test.exs:181-218` uses a body of a few dozen bytes. - -**Recovery measured:** the connection does not merely stall. The next request is consumed as -stale body and **never answered**; after 14.7 s (Plug's default `read_timeout`) the server closes -with zero bytes returned. - -``` -poisoned-connection recovery: next-request result after 14.7s: b'' -``` - -**Root cause isolated independently of this package.** A minimal two-route Plug reproducing only -the binding shape, on port 4712, nothing from `beam_mcp` involved: - -``` -/stale body=1000 req1=HTTP/1.1 200 OK next=HTTP/1.1 200 OK 0.00s -/stale body=200000 req1=HTTP/1.1 200 OK next= 3.00s -/threaded body=1000 req1=HTTP/1.1 400 Bad Request next=HTTP/1.1 200 OK 0.00s -/threaded body=200000 req1=HTTP/1.1 400 Bad Request next=HTTP/1.1 200 OK 0.00s -``` - -`/stale` answers on the outer conn, `/threaded` on the one `read_body` returned. Only the stale -shape hangs. - -**What a host experiences.** The header this breaks on is the one the transport makes mandatory, -so the most likely client mistake in the whole protocol — a missing or stale -`MCP-Protocol-Version` — is also the one that takes the connection down. Any pooled Elixir HTTP -client (Finch, Mint, `:hackney`) keeps that socket and hands it to the next caller, so **the -victim is a subsequent, well-formed request from a different caller**, which returns no response -at all rather than an error. An unauthenticated party can do this deliberately at one request per -socket. `CHANGELOG.md:81-84` announces this exact class as fixed; five sixths of it is not. - ---- - -# 2. HIGH — `throw` and `exit` in the host's dispatch are not caught; the empty `500` the CHANGELOG says was fixed is still there - -`lib/beam_mcp/transport/http.ex:265-272`. `rescue` catches raised exceptions only. `throw` and -`exit` pass through untouched. - -``` -=== mode=raise HTTP/1.1 500 ... content-type: application/json - {"error":{"code":-32603,"message":"Internal error"},"id":1,"jsonrpc":"2.0"} -=== mode=throw HTTP/1.1 500 Internal Server Error\nconnection: close\n\n -=== mode=exit HTTP/1.1 500 Internal Server Error\nconnection: close\n\n -=== mode=gexit HTTP/1.1 500 Internal Server Error\nconnection: close\n\n -=== mode=kill -``` - -`gexit` is a `GenServer.call(pid, :never_replies, 50)` — a call that times out. That is not an -exotic failure: it is the single most common way a real Elixir dispatch fails, and it exits -rather than raises. `mode=kill` is the process dying asynchronously; the caller gets nothing. - -The bare `500` carries **no `content-type`, no `content-length` and no body**. That is -verbatim the behaviour `CHANGELOG.md:78-80` and the comment at `http.ex:255-259` say was -eliminated: - -> **A crash in the host's dispatch answered with an empty `500`** … It now answers -> `-32603 Internal error` **carrying no detail** - -It answers `-32603` for one of the three exit reasons. The test at -`test/beam_mcp/transport/http_test.exs:220-255` exercises `raise` twice and neither `throw` nor -`exit`, so the suite is green and the claim is still wrong. - -Stability is not affected — the exception reaches the logger through Bandit and the next request -on a fresh connection is 200 OK in all five cases — so this is the protocol defect the module's -own comment describes, not a crash-loop. - -**What a host experiences.** A JSON-RPC client that gets a bodyless 500 has no `id` to correlate -and no error code to branch on. A host whose tools call out to a `GenServer`, an `Ecto.Repo`, or -anything with a `:timeout` gets this on its most common bad day. - ---- - -# 3. HIGH — a two-byte change to `_meta` crashes the plug with a stacktrace before any of the crash handling is reached - -`lib/beam_mcp/transport/http.ex:212`: - -```elixir -body_version = get_in(message, ["_meta", @version_meta_key]) -``` - -`get_in/2` requires `message["_meta"]` to implement `Access`. The JSON is attacker-controlled and -nothing constrains its type. `check_protocol_header/2` runs in the `with` at `:123`, **outside** -the `rescue` at `:267`, so nothing catches it. - -``` -$ POST {"jsonrpc":"2.0","id":1,"method":"tools/list","_meta":"hi"} -HTTP/1.1 500 Internal Server Error (no body, no content-type) - -$ POST {"jsonrpc":"2.0","id":1,"method":"tools/list","_meta":[1,2]} -HTTP/1.1 500 Internal Server Error - -$ POST {"jsonrpc":"2.0","id":1,"method":"tools/list","_meta":7} -HTTP/1.1 500 Internal Server Error -``` - -Server log: - -``` -[error] ** (FunctionClauseError) no function clause matching in Access.get/3 - (elixir 1.19.2) lib/access.ex:324: Access.get("hi", "io.modelcontextprotocol/protocolVersion", nil) - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:212: BeamMCP.Transport.HTTP.check_protocol_header/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:123: BeamMCP.Transport.HTTP.call/2 -``` - -and for the array form, `** (ArgumentError) the Access module supports only keyword lists`. - -`"_meta": null` is fine (200), and `"_meta": {"…/protocolVersion": 1}` is fine (400 `-32020`), so -the guard is only against the container being a non-map. - -This is transport-specific and new in this slice: `BeamMCP.Server.handle_message/2` at -`server.ex:144-147` pattern-matches `"_meta" => %{...}` and a non-map simply falls through to the -next clause. Over stdio the same message is answered; over HTTP it crashes. - -**What a host experiences.** An unauthenticated caller (or one `authorize` lets through) can make -the endpoint emit a stacktrace per request and return a bodyless 500, at will, with a two-byte -edit. Any log-volume alerting sees it as an incident. - ---- - -# 4. MEDIUM — a dispatch payload Jason cannot encode becomes a 500, not a tool error - -`lib/beam_mcp/server.ex:264` (`Jason.encode!` in `tool_success/1`). `to_json_value/1` at -`:353-362` normalises maps, lists and atoms but not tuples, PIDs, refs, functions or structs -without an encoder. - -``` -=== mode=tuple {:ok, {:a, :b}} HTTP/1.1 500 {"error":{"code":-32603,...}} -=== mode=pid {:ok, %{"pid"=>self()}} HTTP/1.1 500 {"error":{"code":-32603,...}} -``` - -It is rescued, so the answer is well-formed and the connection survives — but a host bug in the -*shape* of a successful return is reported to the client as a server-internal failure rather than -as `"isError": true`, and the host learns about it only from the log. A tuple is the single most -likely accidental return value in Elixir. - ---- - -# 5. MEDIUM — an over-declared `Content-Length` holds a connection for 15 s; the transport passes no `read_timeout` - -`lib/beam_mcp/transport/http.ex:165` passes only `length:`. Plug's default `read_timeout` of -15 s applies. - -``` -declared=1000 actual=119 15.00s -> HTTP/1.1 408 Request Timeout -declared=100000 actual=119 15.00s -> HTTP/1.1 408 Request Timeout -declared=1048575 actual=119 15.00s -> HTTP/1.1 408 Request Timeout -``` - -Slow-drip confirmed too: a 200 KB body at 1 byte / 50 ms was still being accepted after 10 s with -no response and no refusal — one connection and one process held per drip client, for as long as -the client keeps trickling under the timeout. - -A declared-shorter `Content-Length` is safe: the body truncates and 400s as a parse error. - -This is a small-`n` slowloris. The module argues at `:61-63` that an unbounded body is -"an unbounded allocation an unauthenticated caller controls" and caps it; the same argument -applies to time and connections and is not made. It is arguably the host's `Bandit` setting, but -the *body* cap was taken as the package's responsibility, so the asymmetry should at least be -stated. - ---- - -# 6. LOW — there is no dispatch timeout, and the docs do not say so - -``` -sleep 20s dispatch: 20.0s -> HTTP/1.1 200 OK -``` - -A dispatch that never returns holds the request forever. There is no `dispatch_timeout` option -and no note in `README.md` or the moduledoc. Combined with the absence of any concurrency limit -in the package's own configuration, a host with one slow tool has an availability surface it was -not told about. - -CPU starvation is *not* a problem: 64 concurrent infinite-loop dispatches in flight, and a normal -request still returned in 0.001 s. BEAM preemption does its job. - ---- - -# 7. LOW — the "1 MiB" cap is a per-request floor, not a memory ceiling - -Measured bytes actually accepted before the 413: - -``` -Content-Length 32 MiB declared -> 1,441,792 bytes read before refusal -chunked, 64 MiB -> 3,670,016 bytes read before refusal -``` - -So the real per-request read is up to ~3.5 MiB, not 1 MiB — Bandit reads in chunks and Plug's -`length:` is a floor. Boundary behaviour itself is correct: 1 MiB − 1024 → 200, exactly 1 MiB → -200, 1 MiB + 1 → 413, and chunked encoding is capped identically (no `Content-Length` to evade -the check with). - -The aggregate is unbounded from the package's side: Bandit's default `num_connections` is 16384 -(read from the live `ThousandIsland.ServerConfig`), so the ceiling is ~16k × ~3.5 MiB. Measured -under load, peak RSS was well-behaved because requests complete fast on loopback: - -``` -baseline RSS = 127.5 MiB - 50 concurrent x ~1MiB body: 0.03s peak RSS = 167.0 MiB (+39.4) -200 concurrent x ~1MiB body: 0.06s peak RSS = 210.5 MiB (+83.0) -500 concurrent x ~1MiB body: 0.13s peak RSS = 255.6 MiB (+128.0) -``` - -Nothing alarming; the point is only that the README sentence "Request bodies are capped at 1 MiB" -reads as a resource bound and is a per-request one. - -Also worth one line: `tool_success/1` emits the payload twice (pretty-printed in `content`, and -again in `structuredContent`), so a tool echoing its input is a ~2× amplifier. - ---- - -# 8. LOW — a client that writes the whole oversized body before reading can get `ECONNRESET` instead of the 413 - -A naive blocking write-then-read client at 1 MiB + 1 raised `ConnectionResetError` and never saw -the response. `curl` is unaffected (`http=413`, exit 0) because it watches for an early response -while writing, and so is any client that does. Worth knowing that some clients will report a -transport error rather than the 413 the transport carefully composed. Not a defect in the fix. - ---- - -# 9. INFORMATIONAL — things I tried to break and could not - -Recorded so the next reviewer does not re-run them. - -- **Supervision is correct.** The package ships no supervisor and no `mod:` in `mix.exs` — right - for a library; the host supervises `Bandit`. Under a `one_for_one` host supervisor I killed the - `Bandit` supervisor pid, the `ThousandIsland.Listener`, the `acceptor_pool_supervisor` and the - `shutdown_listener` in turn. Every one restarted and the next request was 200 OK. A raising - handler leaves the tree untouched. -- **No shared mutable state, no crossed responses.** 500 concurrent `tools/call`s with distinct - ids and distinct echoed arguments: 500 responses, 0 mismatches, 0.08 s. `Server.new/1` per - request builds a 8-key map from a keyword list — correct (it is per-request state, notably - `initialized?`) and immeasurably cheap. -- **Malformed input answers rather than crashing**, except finding 3: bad JSON, empty body, - whitespace-only, bare `null` / number / string, duplicate JSON keys (last wins), lone - surrogates, raw invalid UTF-8, `NUL` in a string, `id` as an object, missing `method`, `params` - as a string, numeric tool name, `arguments` as an array — all produce a JSON-RPC answer. -- **Depth and size do not blow the stack.** 260,000-deep nested arrays, 100,000-deep nested - objects, a single 1 MB string, 50,000 distinct keys, 50,000 duplicate keys: all 200 OK in - ≤ 0.03 s. -- **Content type is ignored entirely** — `text/plain`, `application/x-www-form-urlencoded`, - `garbage/../..` and no header at all all reach dispatch. Flagging for r1's lane rather than - mine; it is a spec-conformance question, not a resilience one. -- **All non-POST methods** (`GET HEAD PUT DELETE OPTIONS PATCH TRACE FROBNICATE`) → 405. -- **The 413 fix works as claimed.** `curl` oversized then valid, one connection: `req1 http=413`, - `req2 http=200 time=0.000276`. -- **The suite is green**: 71 tests, 0 failures. - -Findings about slice records and evidence prose are out of scope per the brief. One is worth a -line anyway because it is what let 1, 2 and 3 through: `logs/resilience.txt` measures six things, -and all six are the cases that pass. It never asks the question its own last row implies — whether -the next-request defect exists on any path other than 413 — and it never varies the crash reason -beyond `raise`. - ---- - -## What I would want to see before approving - -1. Thread the post-`read_body` conn into every error exit (finding 1), and cover it with a test - whose body exceeds one socket read — a few dozen bytes will pass regardless of the fix. -2. `catch :throw, v` / `catch :exit, r` alongside the `rescue` (finding 2), or amend - `CHANGELOG.md:78-80` and `http.ex:255-259` to say only `raise` is handled. A test using a - timing-out `GenServer.call` would be the honest one. -3. Guard the `_meta` container type at `http.ex:212` (finding 3). - -Findings 4-8 I would file rather than block on. - -VERDICT: changes required diff --git a/slices/002-streamable-http/logs/round1.s1.md b/slices/002-streamable-http/logs/round1.s1.md deleted file mode 100644 index d5d9674d..00000000 --- a/slices/002-streamable-http/logs/round1.s1.md +++ /dev/null @@ -1,407 +0,0 @@ - - -From: beam_mcp · Security lane s1 -To: beam_mcp · Coding Agent -Re: slice 002-streamable-http, round 1, HTTP attack surface -Type: Report - -**Tree reviewed:** `babfc5e40522288e49fb17475bab1765e83711fb` -(`git write-tree` in `/home/aylac/Projects/beam_mcp-wt/002-review1`, also written to -`logs-s1.tree` in that checkout). - -**Method.** Everything below was measured against a real `Bandit` listener on `127.0.0.1` -high ports, driven with a raw `:gen_tcp` client so the exact bytes on the wire — duplicate -headers, lying `Content-Length`, dribbled bodies, a malformed request line — are mine and not -a client library's. `mix test` on this tree: **71 tests, 0 failures.** Harness scripts are in -my scratchpad; every finding below quotes the request and the response. - -**The headline: the contract holds. I could not evade it.** Section 1 of the PLAN is correct -as built — see "Attacks that failed", which is the longer half of this report. What I did find -is that the package's *stated* discipline about not leaking host internals to an HTTP caller is -enforced on one branch and not on the two next to it. - ---- - -## 1. BLOCKING — the host's authorization failure reason is `inspect`ed into the 403 body, to an unauthenticated caller - -`lib/beam_mcp/transport/http.ex:133` - -```elixir -{:error, reason} -> - send_json(conn, 403, error(nil, -32_600, "Forbidden: #{inspect(reason)}")) -``` - -`:authorize` is documented as `(Plug.Conn.t() -> :ok | {:error, term()})` and the package -"never inspects what it does" (moduledoc, line 24). It does inspect it — literally — and puts -the result in a response body that is returned to a caller who has just been told they are not -allowed to talk to this endpoint. `{:error, term()}` invites a structured term, and a host -building one naturally puts the reason for the refusal in it. - -Host used (a plausible one, not a contrived one): - -```elixir -authorize: fn _ -> - {:error, %{expected_bearer: "s3cr3t-token-abc", - db: "postgres://user:pw@10.0.0.5/prod"}} -end -``` - -Request: - -``` -POST /mcp HTTP/1.1 -Host: 127.0.0.1 -Content-Type: application/json -MCP-Protocol-Version: 2026-07-28 -Content-Length: 86 - -{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"echo","arguments":{}}} -``` - -Response: - -``` -HTTP/1.1 403 Forbidden -{"error":{"code":-32600,"message":"Forbidden: %{expected_bearer: \"s3cr3t-token-abc\", db: \"postgres://user:pw@10.0.0.5/prod\"}"},"id":null,"jsonrpc":"2.0"} -``` - -**What an attacker gains:** whatever the host put in its refusal term, before authenticating. -An `{:error, exception}` from a `rescue` in the host's auth path would ship a struct with a -message; an `{:error, {:expired, %User{...}}}` ships a user record; an -`{:error, {:no_match, conn.req_headers}}` ships the request back plus anything the host added. - -This is the same class the module refuses on the crash path, and says so at length -(`http.ex:255-264`: *"Leaking `Exception.message/1` to an HTTP caller would hand an -unauthenticated party the host's internals"*). The crash path is at least **behind** authorize. -This one **is** the unauthenticated path. The rule is applied to the safer branch and not the -more exposed one. - -The test suite does not see it because `http_test.exs:88` refuses with the atom `:nope`, whose -`inspect` discloses nothing. - -**Fix shape (yours to choose):** send a fixed `"Forbidden"` and `Logger`-log the reason, exactly -as the crash path already does. If a host wants a reason on the wire it can build the response -itself; it cannot un-send one this Plug decided to include. - ---- - -## 2. BLOCKING — a non-map `_meta` crashes *outside* the rescue: bare, empty HTTP 500 - -`lib/beam_mcp/transport/http.ex:212` (`check_protocol_header/2`), reached from `call/2:123`, -which is **not** inside the `rescue` at `http.ex:267`. - -```elixir -body_version = get_in(message, ["_meta", @version_meta_key]) -``` - -`decode/1` guarantees only that the body is a JSON **object**. `_meta` is then any JSON value. - -Request (63 bytes): - -``` -POST /mcp HTTP/1.1 -Content-Type: application/json -MCP-Protocol-Version: 2026-07-28 - -{"jsonrpc":"2.0","id":1,"method":"ping","_meta":"x"} -``` - -Response: - -``` -HTTP/1.1 500 Internal Server Error - -``` - -Server log: - -``` -** (FunctionClauseError) no function clause matching in Access.get/3 - (elixir 1.19.2) lib/access.ex:324: Access.get("x", "io.modelcontextprotocol/protocolVersion", nil) - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:212: BeamMCP.Transport.HTTP.check_protocol_header/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:123: BeamMCP.Transport.HTTP.call/2 -``` - -Also reproduced with `"_meta":[1,2]` (`ArgumentError`, "the Access module supports only keyword -lists") and `"_meta":7` (`FunctionClauseError`). All three: `500`, empty body. - -**What an attacker gains:** the empty 500 that `http_test.exs:221` — *"answers with a JSON-RPC -internal error, not an empty 500"* — asserts is gone. It is not gone; it is one JSON scalar -away, and it is reachable with a smaller, cheaper request than the dispatch crash that test -covers. Concretely: (a) the transport's "every refusal is a JSON-RPC error" property is false, -so a conforming client gets an unparseable response; (b) an unhandled exception escapes the -Plug into the host's error handling, and a host that wraps this Plug in `Plug.Debugger` for dev -— an extremely common thing to do — renders the stacktrace, the source line, and the request -into the response body, which is precisely the disclosure `http.ex:255-264` set out to prevent; -(c) it is a free, unattributed log-flood primitive, a full formatted stacktrace per 63-byte -request. - -Note the sibling: `do_dispatch/3:282` does `Map.put(message["_meta"] || %{}, ...)`, which -`BadMapError`s on the same input. That one *is* inside the rescue, so fixing only line 212 -converts this to a `-32603`. The right answer is to reject a non-map `_meta` as a `400` -malformed request in `decode/1` or at the top of `check_protocol_header/2`, since a `_meta` -that is not an object is not a valid MCP message. - ---- - -## 3. NON-BLOCKING — `rescue` catches raises only; `exit` and `throw` from the host's dispatch produce the empty 500 the slice says it removed - -`lib/beam_mcp/transport/http.ex:265-272` - -```elixir -defp dispatch(conn, message, opts) do - do_dispatch(conn, message, opts) -rescue - exception -> ... -end -``` - -`rescue` handles `:error`-class exceptions. It does not handle `:exit` or `:throw`. Measured -against one listener, three dispatch functions: - -| dispatch does | HTTP status | body | -|---|---|---| -| `raise "..."` | 500 | `{"error":{"code":-32603,"message":"Internal error"},"id":1,...}` | -| `exit(:kaboom_secret_exit)` | 500 | *(empty)* | -| `throw(:thrown_secret)` | 500 | *(empty)* | -| returns `{:ok, %{p: self()}}` (unencodable) | 500 | `{"error":{"code":-32603,...}}` — correctly caught | - -`exit` is not an exotic failure in a BEAM host: `GenServer.call/3` on a timeout or a dead -process **exits**, `Task.await/2` on a timeout **exits**, `:sys.get_state` on a busy process -**exits**. A host whose `dispatch` calls into a GenServer — which is the shape the README -recommends — will hit the empty-500 branch on its first backend timeout, in production, having -tested only the `raise` case because that is the case the package documents and tests -(`http_test.exs:221`, `logs/resilience.txt` line "dispatch RAISES"). - -`logs/resilience.txt` records only the raising variant, so the resilience table overstates what -was measured. `catch :exit, reason` / `catch value` alongside the `rescue`, and a row per class -in the log, closes it. - ---- - -## 4. NON-BLOCKING — only the *first* `Origin` header is validated - -`lib/beam_mcp/transport/http.ex:145-155` - -```elixir -[origin | _] when is_binary(origin) -> - if origin in allowed, do: :ok, else: {:error, 403, ...} -``` - -The spec MUST quoted at `logs/spec-streamable-http.md:57-61` is *"If the `Origin` header is -present and invalid, servers MUST respond with HTTP 403 Forbidden."* With two `Origin` headers, -an invalid one is present and the request is served. - -``` -POST /mcp HTTP/1.1 -Origin: https://app.example.com -Origin: https://evil.com -MCP-Protocol-Version: 2026-07-28 -... -``` -→ `HTTP/1.1 200 OK`, `tools/call` executed. - -Reversed order (`evil` first) → `403`, so it is order-dependent, not a general bypass. - -**What an attacker gains:** in the direct browser case, nothing — a browser emits exactly one -`Origin` and cannot be made to emit two. The exposure is an intermediary that merges, reorders -or appends `Origin` (some proxies and service meshes do), and any host that terminates TLS in -front of this Plug. The fix is one line: validate every value, not the head — -`Enum.all?(get_req_header(conn, "origin"), &(&1 in allowed))`, with `[]` still passing. - ---- - -## 5. NON-BLOCKING — a body-reading `:authorize` works for small requests and silently returns nothing for large ones - -`lib/beam_mcp/transport/http.ex:120-121` — `opts.authorize.(conn)` runs **before** -`read_body_bounded(conn)`. - -`:authorize` is the package's whole answer to the confused-deputy problem, and the problem it -names is `tools/call` specifically. The obvious host implementation is therefore per-tool: read -the body, look at `params.name`, decide. That host gets a size-dependent endpoint. Same -listener, same `authorize` (reads the body with `Plug.Conn.read_body/2`, returns `:ok`), three -body sizes: - -``` -body 93 bytes -> HTTP/1.1 200 OK (correct result) -body 99972 bytes -> -body 899972 bytes -> -``` - -The small case passes because the whole body arrived in the adapter's first read; the large -cases do not, and the transport's own `read_body` then has nothing to read. A host writes this, -tests it with a small fixture, and ships an endpoint that fails on real payloads. - -**What an attacker gains:** a cheap, reliable request-killer against such a host (send >100 KB), -and — worse for the host — whatever their per-tool policy was supposed to do, it now does not -run to completion on exactly the requests large enough to matter. - -Not a bug in the bytes so much as a hole in the contract: nothing tells a host whether -`authorize` may read the body, and the one thing `authorize` most needs to see is the one thing -it cannot reliably see. Either decode first and pass the message to `authorize` alongside the -conn, or state in the `@doc` that `authorize` must not read the body and that per-tool policy -belongs in the host's `dispatch`. - ---- - -## 6. NOTE — the Plug answers on every path - -`lib/beam_mcp/transport/http.ex` has no path check, and the documented wiring -(moduledoc:34-42, `README.md:100-110`) hands the module straight to `Bandit`, which mounts it at -the root. Measured: `POST /`, `POST /anything/else` → `200 OK` with the tool result. The spec -(`logs/spec-streamable-http.md:47-49`) says the server **MUST** provide *a single* HTTP endpoint -path. Low security weight — a scanner finds the endpoint slightly more easily — but the -documented usage does not produce the endpoint shape the module's own first line claims -("a `Plug` serving `2026-07-28` at one endpoint"). - -Adjacent conformance gap, same area: the spec at `logs/spec-streamable-http.md:266-270` requires -`404` + `-32601` for an unimplemented RPC method; this returns `200` with the `-32601` body. - -## 7. NOTE — `:authorize` returning anything other than `:ok` / `{:error, _}` is an empty 500 - -`authorize: fn _ -> false end` → `WithClauseError` at `http.ex:118`, uncaught, `HTTP 500`, empty -body. Fails **closed**, which is the right direction, but it is the same unparseable response as -finding 2 and it is a host mistake the Plug could name. - -## 8. NOTE — the 413 is not delivered above ~4 MiB - -Body cap itself is exact and correct: `1_048_576` bytes → served; `1_048_577` → `413`. But: - -``` -body 1100008 -> 413 Request Entity Too Large -body 2000008 -> 413 -body 4000008 -> 413 -body 8000008 -> no response (connection reset) -body 16000008 -> no response (connection reset) -``` - -The server closes the connection before the client has finished writing, and the pending -response is lost to the reset. Bandit-level, no resource is retained, and the refusal still -happens — but a caller cannot distinguish "too large" from "server gone". - -## 9. NOTE — `Jason` resolves duplicate JSON keys to the **first** value - -`Jason.decode!(~s({"method":"ping","method":"tools/list"}))` → `%{"method" => "ping"}`. -Confirmed end-to-end: that body is executed as `ping`, not `tools/list`. Python's `json`, -Node's `JSON.parse` and most WAF body parsers keep the **last**. Any host that filters MCP -methods at a gateway in front of this Plug is desynchronised from what this server executes. -Nothing for the package to fix in code; worth one sentence to hosts who plan to filter upstream. - -## 10. NOTE — over HTTP, `tools/call` executes with no `initialize`, ever - -`state.initialized?` is written at `server.ex:130` and `server.ex:175` and **read nowhere** -(`grep -n "initialized?" lib/`: four hits, all writes or the typespec). The transport builds a -fresh `Server.new/1` per request (`http.ex:285`), so every HTTP request runs with -`initialized?: false` and `tools/call` dispatches regardless. - -The README says (line 128-131) *"a request with no era established is malformed and refused."* -That is **true of the era** — see the failed attacks below, I could not get a non-modern or -absent era past the header check — and **not true of the lifecycle**. The PLAN's §1 framing -("the bare-request path that exists on stdio cannot exist over conformant HTTP") is half right -in the same way. Pre-existing core behaviour, surfaced rather than caused by this slice; I raise -it because §1 is the claim under review and this is the part of it that does not hold. - -## 11. NOTE — "at start, not on the first request" holds for the default init mode only - -`use Plug.Builder, init_mode: :runtime` + `plug BeamMCP.Transport.HTTP` **compiles**; the -`ArgumentError` then fires on the first request instead. Still fails closed, still refuses. Only -the timing claim is mode-dependent. - ---- - -## Attacks that failed — the contract held on every path I tried - -I could not break §1's central claim, and this list is the evidence for that. - -**Evading the two required options.** All of the following raise -`ArgumentError` naming the missing option: - -| wiring | result | -|---|---| -| `HTTP.init([])` | ArgumentError (`:authorize`) | -| `HTTP.init(tool_catalog: Cat)` | ArgumentError | -| `HTTP.init(tool_catalog: Cat, authorize: fn _ -> :ok end)` | ArgumentError (`:allowed_origins`) | -| `HTTP.init(tool_catalog: Cat, allowed_origins: :any)` | ArgumentError (`:authorize`) | -| `HTTP.init(authorize: nil, allowed_origins: nil)` | ArgumentError | -| `HTTP.init(%{authorize: ..., allowed_origins: ...})` (map, not keyword) | `FunctionClauseError` in `Keyword.get/3` — fails | -| `Bandit.start_link(plug: BeamMCP.Transport.HTTP)` (bare module) | ArgumentError at start; nothing binds the port (`:econnrefused`) | -| `use Plug.Builder; plug BeamMCP.Transport.HTTP` | ArgumentError at **compile** time | -| `use Plug.Router; forward "/mcp", to: BeamMCP.Transport.HTTP` (no `init_opts`) | ArgumentError at **compile** time | -| `use Plug.Builder, init_mode: :runtime; plug ...` | compiles; ArgumentError on first request (finding 11) | -| `[authorize: fn, authorize: nil, ...]` duplicate keys | first wins → accepted, and `[authorize: nil, authorize: fn]` → raises. Both directions fail safe. | - -`allowed_origins: []` is accepted, which is correct: it rejects every present `Origin` and is -fail-closed. `authorize: &IO.inspect/1` is accepted — any 1-arity function is — but a return -value that is not `:ok` refuses the request (finding 7). - -**Reaching `state.dispatch` without passing `authorize`.** No path found. `dispatch/3` is called -from exactly one place, `call/2:124`, after `opts.authorize.(conn)` at line 120. I also checked -the side doors into the core: an **id-less** `tools/call` does not match `server.ex:197`, falls -to the `_message` catch-all at `server.ex:242`, and returns `202` with **no** dispatch; a JSON -array body is refused at `http.ex:196` before the core's batch clause is reached. - -**Forging or omitting the era.** Every attempt refused: - -| request | response | -|---|---| -| no `MCP-Protocol-Version` header | `400` `-32600` "Missing mcp-protocol-version header" | -| header `1999-01-01` | `400` `-32022` `{"supported":["2026-07-28"],"requested":"1999-01-01"}` | -| header modern, `_meta` claims `2025-11-25` | `400` `-32020` HeaderMismatch | -| two headers, bad first | `400` `-32022` (first wins, and it is the strict direction) | -| two headers, good first | `200` — first wins here too; the second is ignored, not honoured | - -`do_dispatch/3:278-283` overwrites `_meta` with the modern version unconditionally, so no -message carrying a legacy era or no era reaches `handle_message/2`. That half of §1 is sound. - -**Origin bypass.** Against `allowed_origins: ["https://app.example.com"]`, every one of these -got `403 Origin not allowed`: `https://evil.com`, `HTTPS://APP.EXAMPLE.COM` (case), -`https://app.example.com/` (trailing slash), `https://app.example.com ` (trailing space), -`https://app.example.com\t` (trailing tab), `null`. Comparison is exact string membership with -no prefix, suffix or normalisation logic — the usual origin-check bug class is simply absent. -Absent `Origin` passes, which matches the quoted MUST and is documented at `http.ex:141-142`. -Browser CSRF is additionally blocked by the mandatory `MCP-Protocol-Version` header, which no -form or simple request can set and which forces a preflight. - -**Resource exhaustion.** Nothing became unbounded: - -- body cap is exact (1 048 576 served / 1 048 577 → 413) and is a single bounded read; -- **slowloris**: header sent, `Content-Length: 500000` declared, one byte dribbled every 12 s — - Bandit's body read timeout fired at ~15 s (`** (Bandit.HTTPError) Body read timeout`) and the - socket was closed by t=36 s. The connection cannot be held indefinitely; -- **lying `Content-Length`** (declare 5 000 000, send 100 bytes, stop): no response, connection - closed on timeout, nothing retained; -- **40 concurrent 1 MiB bodies**: all `200`, total 54 ms. `Server.new/1` is built per request - from an immutable keyword list and the module holds no ETS, `persistent_term` or process - state, so there is no shared mutable surface for requests to interfere through; -- **deeply nested JSON**: 100 000-deep array → `400` "Expected a JSON object, got an array"; - 50 000-deep nested value inside an object → handled, `200`, no crash; -- **reflection amplification**: a 900 KB `id` comes back in the error response — 900 305 bytes - out for 900 KB in, ~1:1, and only after `authorize`. Not an amplifier; -- listener survived every crash class; the request after each one succeeded. - -**Injection.** No attacker-controlled bytes reach a response *header*. `conn.method` is echoed -into the `405` JSON body but Bandit rejects a malformed request line before the Plug sees it -(`FOO" /mcp HTTP/1.1` → Bandit's own `400`), and `Jason.encode!` escapes the body. -`Origin` is never echoed. Content-Type is unvalidated (`text/plain`, -`application/x-www-form-urlencoded`, absent — all served) but, per above, the mandatory custom -header already forecloses the simple-request CSRF that would exploit it. - ---- - -## Summary - -The design decision under review is sound and is implemented as claimed: I attacked the -required-options contract from ten directions and it refused every one, and the protocol-version -header does close the era half of SCR-255. Findings 1 and 2 are not about that decision — they -are about the package applying its own stated rule ("an HTTP caller learns only that the request -failed") to the crash branch while the two branches on either side of it hand out the host's -refusal term and a bare empty 500 respectively. Both are small fixes; both are on paths an -unauthenticated caller reaches. - -Finding 10 is the one I would not let ship silently in prose: the README sentence at line 128 -is doing more work than the code supports. - -VERDICT: changes required diff --git a/slices/002-streamable-http/logs/round2.r1.md b/slices/002-streamable-http/logs/round2.r1.md deleted file mode 100644 index af3d6155..00000000 --- a/slices/002-streamable-http/logs/round2.r1.md +++ /dev/null @@ -1,262 +0,0 @@ -From: beam_mcp · Reviewer lane r1 -To: beam_mcp · Coding Agent -Re: slice 002-streamable-http, round 2, correctness and conformance -Type: Report - -Tree read: `a5cfb67b8a8854714cde36522292c9fc57e96d6a` -(`cd /home/aylac/Projects/beam_mcp-wt/002-review2 && git write-tree`; also written to -`/home/aylac/Projects/beam_mcp-wt/002-review2/logs-r1.tree`) - -All probes and mutations ran against a copy at `…/scratchpad/r1b/mut2`, never the review -worktree; every mutant was applied with an asserted count, compiled with `mix compile --force` -(the round-1 mtime trap), and the file restored and re-diffed against the review worktree after. - -Round 1's six findings are fixed and I verified each independently rather than reading the log — -details at the end. Two of the fixes reproduce, one function away, the exact defect they fix. - ---- - -## 1. HIGH — a non-map `params` raises **outside** the rescue: bare empty `500`, connection closed - -**file:line** `lib/beam_mcp/transport/http.ex:355` - -```elixir -defp check_name_header(conn, %{"method" => "tools/call"} = message, id) do - check_standard_header(conn, "mcp-name", get_in(message, ["params", "name"]), id) -end -``` - -`check_headers/2` runs inside the `with` in `call/2`; only `dispatch/3` carries the -`rescue`/`catch`. `params` is any JSON value once the body is an object, so `get_in/2` on a -string or a list raises `FunctionClauseError` in `Access.get/3` and the exception leaves `call/2`. - -This is the same defect, in the same diff, as the one just fixed twelve lines above — the comment -at `http.ex:293-297` states it exactly: *"`_meta` is any JSON value once the body is an object, so -a non-map one must be refused rather than reached into … producing exactly the bare empty 500 this -module exists to avoid — one JSON scalar away from the crash path a test already covered."* -`body_protocol_version/1` was hardened; `params` was not. - -**Expected**: a `400` (or the `-32020` the sibling path returns). -**Observed**, real Bandit on `127.0.0.1:4602`, `params: "not-a-map"` with correct headers: - -``` -RAW-500-RESPONSE>>>"HTTP/1.1 500 Internal Server Error\r\nconnection: close\r\n\r\n"<<< -``` - -Empty body, and the connection is gone — the next request on that socket fails `:closed` -(`B4 next on same socket : ERROR :closed`). `params: [1,2,3]` does the same (`B5 … 500`). -Under `Plug.Test` it surfaces as the raise itself: - -``` -P5 params not a map : RAISED OUT OF call/2: FunctionClauseError -- no function clause matching in Access.get/3 -``` - -The general form is worth fixing once rather than per-field: `check_headers/2` reaches into a -decoded body that is attacker-shaped, and it runs where nothing catches. Either guard every -reach-in the way `body_protocol_version/1` does, or put the `rescue`/`catch` around the whole of -`call/2` instead of only `dispatch/3`. - ---- - -## 2. HIGH — only the **first** `Mcp-Method` / `MCP-Protocol-Version` value is compared; validation is order-dependent - -**file:line** `http.ex:340` (`[value | _] when value == body_value`) and `http.ex:282` -(`get_req_header(@protocol_header) |> List.first()`). - -`check_origin/2` was fixed in this same diff to check *every* value, with the rationale at -`http.ex:176-178`: *"EVERY Origin header is checked, not the first. A lane sent a good one -followed by a bad one and got 200 with tools/call executed; reversed, 403. Order-dependent -validation is not validation, and intermediaries do merge and append this header."* - -That argument is not about `Origin`. It is about repeated headers, and it applies with more force -to `Mcp-Method`, because that header **is** the source-of-truth control: the spec's stated reason -for validating it is that a load balancer may route on the header while the server executes the -body (`spec-streamable-http.md:583-590`). An intermediary that reads the last value, or joins -duplicates per RFC 9110 §5.3, sees a different method from the one this server runs. - -**Observed** — body is `tools/call`/`echo` throughout, two `Mcp-Method` headers: - -``` -P2 dup Mcp-Method (good,bad): status=200 body={"id":1,"jsonrpc":"2.0","result":{... <- executed -P2b dup Mcp-Method (bad,good): status=400 body={"error":{"code":-32020,... -P3 dup version (good,bad) : status=200 body={"id":1,"jsonrpc":"2.0","result":{... -``` - -**Expected**: a repeated standard header is refused, or every value must match. `-32020` covers -it — the spec's own wording is "required headers are missing/**malformed**". - ---- - -## 3. MEDIUM — `Mcp-Param-{Name}` is never validated, and this package advertises `x-mcp-header` - -**file:line** `http.ex:269-279` (`check_headers/2` validates three headers and no others); -`lib/beam_mcp/server.ex` `tool_definition/1` passes `input_schema` through verbatim. - -**Spec** (`spec-streamable-http.md:552-562`): *"Any server that processes the message body **MUST** -validate that encoded header values, after decoding if Base64-encoded, match the corresponding -values in the request body. Servers **MUST** reject requests with a `400 Bad Request` HTTP status -and JSON-RPC error code `-32020` (`HeaderMismatch`) if any validation fails."* - -`x-mcp-header` is optional *for servers to designate* — but the designation lives in the tool's -`inputSchema`, which this package neither constrains nor strips, so a host can turn it on and -conforming clients then **MUST** mirror those parameters into headers. At that point the server -must validate them, and this one does not. - -**Observed** — catalogue tool `echo` with `"region": {"x-mcp-header": "Region"}` in its schema: - -``` -XMCPHEADER-ADVERTISED>>>yes<<< # the annotation reaches the client via tools/list -MCPPARAM-MISMATCH>>>HTTP/1.1 200 OK<<< # Mcp-Param-Region: us-west1 vs body region "eu-west1" -``` - -Header says one region, body says another, the call runs on the body. That is finding 2 of round 1 -for the custom-header half, and it is reachable through a supported, documented host configuration. -If the intent is not to support `x-mcp-header`, the honest form is to reject a `tools/list` -schema carrying the annotation (or strip it) rather than advertise a contract the transport -does not keep. - ---- - -## 4. MEDIUM — the Base64 sentinel form of `Mcp-Name` is not decoded before comparison - -**file:line** `http.ex:335-350`, `http.ex:354-356`. - -**Spec** (`spec-streamable-http.md:500-507` and `:620-628`): *"servers **MUST** decode an encoded -`Mcp-Name` or `Mcp-Param-{Name}` value before comparing it to the corresponding request body value -during Server Validation."* Tool names are only SHOULD-constrained to header-safe characters, and -this package places no constraint at all on them — `tool_definition/1` does -`Atom.to_string(tool.name)`. - -**Observed**, tool `:"café_search"`, client encoding exactly as the spec requires: - -``` -P4 base64 Mcp-Name (=?base64?Y2Fmw6lfc2VhcmNo?=) : status=400 - body={"error":{"code":-32020,"message":"Header mismatch: mcp-name header - '=?base64?Y2Fmw6lfc2VhcmNo?=' does not match body value 'café_search'"},"id":1,"jsonrpc":"2.0"} -``` - -A fully conforming client cannot call that tool over HTTP, and the recovery the spec advises for a -`HeaderMismatch` (`spec-streamable-http.md:541-546` — re-read `tools/list`, retry) cannot help, -because the client was already right. It is one `String.starts_with?("=?base64?")` / -`Base.decode64` in `check_standard_header/4`. - ---- - -## 5. MEDIUM — `404` is applied to every `-32601`, including one where the method **is** implemented - -You asked whether the `404` mapping is right in every case. Two of the three sites, yes; one, no. - -**file:line** `http.ex:393-396` matches on the code alone: - -```elixir -{_state, %{"error" => %{"code" => -32_601}} = response} -> send_json(conn, 404, response) -``` - -`lib/beam_mcp/server.ex` emits `-32601` at three places: - -| site | meaning | `404` correct? | -|---|---|---| -| `server.ex:235` `"Method not found: #{method}"` | method table miss | yes | -| `server.ex:155` `"Method not found: ping"` (modern era) | method removed in `2026-07-28` | yes | -| `server.ex:222` `"Unknown tool: #{name}"` | `tools/call` **is** implemented; the tool is not | **no** | - -**Spec** (`spec-streamable-http.md:271-275`): the `404` is conditioned on *"the server does not -implement the requested **RPC method**"*. An unknown tool is a parameter that does not resolve -inside a method that exists. - -**Observed** — the two are indistinguishable on the wire: - -``` -P1 unknown TOOL : status=404 body={"error":{"code":-32601,"message":"Unknown tool: no_such_tool"},...} -P1b unimplemented METHOD : status=404 body={"error":{"code":-32601,"message":"Method not found: resources/list"},...} -``` - -Key the status off the method table (or have `server.ex:222` stop reusing `-32601` — the -`2026-07-28` changelog moved the analogous "resource not found" to `-32602 Invalid Params`, -`spec-changelog.md:39`), rather than off the code. The moduledoc table (`http.ex:59`) and -`CHANGELOG.md:52` both say "unknown method | `404`, `-32601`", which describes the intent and not -the behaviour. - ---- - -## 6. MEDIUM — the multi-`Origin` fix has no test; the mutant survives - -**file:line** `http.ex:187`. The behaviour and its rationale are in the code -(`http.ex:176-178`), but nothing pins it. - -``` -== N12 only the first Origin checked (round-1 fix reverted) - applied: old 1 -> 0 ; new occurrences 1 # Enum.all? -> Enum.any? - 82 tests, 0 failures exit=0 - >>> SURVIVOR -``` - -Proven by effect rather than by the green suite alone — `allowed_origins: ["https://good.example"]`: - -``` ---- under the Enum.any? mutant --- -ORIGIN good,evil -> 200 ORIGIN evil,good -> 200 (suite: 82 tests, 0 failures) ---- restored --- -ORIGIN good,evil -> 403 ORIGIN evil,good -> 403 (suite: 82 tests, 0 failures) -``` - -The three existing `Origin` tests all send a single header, so none can distinguish. This is the -same gap round 1 recorded for the body cap — the fix landed, the regression test did not — and -the fix is the one the diff singles out as found by a lane. - ---- - -## 7. LOW — `Mcp-Method` is required on **notification** POSTs, which the revision leaves undefined - -**file:line** `http.ex:273` (applied to every message, id or not). - -**Spec** (`spec-streamable-http.md:93-103`): *"The notification rules above describe the transport -mechanics for a notification POST; **header requirements for notification POSTs are not defined by -this revision**."* - -``` -P6 notification, no Mcp-Method: status=400 - body={"error":{"code":-32020,"message":"Header mismatch: Missing mcp-method header; it is required"},"id":null,...} -``` - -Requiring it is defensible strictness, but it is a hard `400` for a client that follows that Note, -and neither the moduledoc table ("`Mcp-Method` on every request") nor `CHANGELOG.md:48` says the -transport is stricter than the revision here. Either say so in the table, or exempt bodies with no -`id`. - ---- - -## Verified fixed — checked on the artefact, not the log - -* **R1-1, the package would not compile without `plug`.** Built a fresh consumer whose only dep is - `{:beam_mcp, path: …}`. `mix compile`'s **own** exit status (not a pipeline's): `0`. - `ls deps` → `jason` only. `{Code.ensure_loaded?(HTTP), Stdio, Server}` → `{false, true, true}` — - the HTTP module is correctly absent while the rest of the package works. -* **R1-2, `Mcp-Method` / `Mcp-Name`.** Both required and both compared to the body. My case B is - pinned: mutants N1 (missing-header branch → `:ok`), N2 (mismatch branch → `:ok`) and N3 - (`Mcp-Name` never checked) are all killed. -* **R1-3, `404` for an unimplemented method.** N4 (`404` → `200`) killed. See finding 5 for the - over-broad half. -* **R1-4, `-32020`.** N5 (`-32020` → `-32600`) killed by 6 tests. -* **R1-5, the `403` leak.** N11 (reason re-interpolated into the body) killed. The reason goes to - `Logger`, and the non-`:ok`/`{:error, _}` return now fails closed rather than raising. -* **R1-6, the cap and the 413.** N6 (`413`→`200`), N7 (`connection: close` removed) and N8 (cap - removed) are all killed — the three round-1 survivors are gone. -* **The keep-alive diagnosis is right and the fix works.** Measured over one raw socket, 16 KB body - on a post-`read_body` refusal: - `B1 16KB body, missing Mcp-Method : HTTP/1.1 400 Bad Request` then - `B2 next on same socket : HTTP/1.1 200 OK`. Recording that the first diagnosis was wrong, in the - shipped `CHANGELOG.md`, is the right call. -* **`throw`/`exit` coverage.** N10b (whole `catch` block deleted) killed. -* **Non-map `_meta`.** N9 (`_other -> :invalid` → `nil`) killed. See finding 1 for its sibling. -* **`handle_message/2` is still 13 clauses**, and `lib/beam_mcp/server.ex` is untouched in this - delta — acceptance criterion 6 continues to hold. -* **Gate, read line by line rather than by exit code**: - `format pass · compile pass · test pass · credo pass · reuse pass (22 commentable files) · - licence files pass · Gate OK` — `82 tests, 0 failures`. -* **`Allow: POST` on the 405** (round-1 finding 9) is in, and `CHANGELOG.md:53` now correctly calls - the 405 a SHOULD. -* **The archived spec pages are unchanged in this delta**, and remain faithful to the live page I - re-fetched in round 1. - -VERDICT: changes required diff --git a/slices/002-streamable-http/logs/round2.r2.md b/slices/002-streamable-http/logs/round2.r2.md deleted file mode 100644 index 87f504ed..00000000 --- a/slices/002-streamable-http/logs/round2.r2.md +++ /dev/null @@ -1,374 +0,0 @@ -From: beam_mcp · Reviewer lane r2 -To: beam_mcp · Coding Agent -Re: slice 002-streamable-http, round 2, resilience and failure behaviour -Type: Report - -Tree reviewed: `a5cfb67b8a8854714cde36522292c9fc57e96d6a` -(`cd /home/aylac/Projects/beam_mcp-wt/002-review2 && git write-tree`; also written to -`logs-r2.tree` in that checkout) - -## How I measured - -Re-run, not read. `lib/` and `test/` copied from the review checkout (`diff -r` → identical for -both) into a throwaway probe tree with a fresh `_build` for `beam_mcp`; a real Bandit 1.12.5 -listener on `127.0.0.1:4721`; raw sockets for keep-alive, partial writes and lying -`Content-Length`. Every script edit asserted its match count before writing. Probe-catalog -discipline as before, and the proof re-run against this tree first: - -``` -PROOF mode reaches dispatch: True # {"mode":"echoback"} echoed back, 200 -``` - -`mix test` in the probe copy: **82 tests, 0 failures** — matches your claim. - ---- - -# Part 1 — the three round-1 findings - -## Finding 1 (stale conn in `else`) — FIXED, and I pushed harder than your check - -`http.ex:148-167`. Every step returns `{:ok, conn}` and every refusal carries the conn it was -handed. I ran **19 early-return paths × two body sizes**, two requests on one socket: - -``` - pad=16 KB pad=200 KB -baseline 200 req1 200 next 200 req1 200 next 200 -403 bad Origin req1 403 next 200 req1 403 next 200 -403 authorize deny req1 403 next 200 req1 403 next 200 -405 wrong method req1 405 next 200 req1 405 next 200 -400 missing proto hdr req1 400 next 200 req1 400 next 200 -400 proto mismatch req1 400 next 200 req1 400 next 200 -400 unsupported version req1 400 next 200 req1 400 next 200 -400 missing mcp-method req1 400 next 200 req1 400 next 200 -400 mcp-method mismatch req1 400 next 200 req1 400 next 200 -400 missing mcp-name req1 400 next 200 req1 400 next 200 -400 mcp-name mismatch req1 400 next 200 req1 400 next 200 -400 invalid JSON req1 400 next 200 req1 400 next 200 -400 non-object JSON req1 400 next 200 req1 400 next 200 -400 _meta not a map req1 400 next 200 req1 400 next 200 -404 unknown method req1 404 next 200 req1 404 next 200 -500 rescued raise req1 500 next 200 req1 500 next 200 -500 throw req1 500 next 200 req1 500 next 200 -500 exit req1 500 next 200 req1 500 next 200 -202 notification req1 202 next 200 req1 202 next 200 -``` - -Nothing hangs. The four paths your `keepalive.txt` does not cover — 403 origin, 403 authorize, -405, and the two new header refusals — are clean too. Closed. - -## Finding 2 (`throw`/`exit`) — FIXED - -`http.ex:376-380`. Measured against a live listener: - -``` -raise 500 {"error":{"code":-32603,"message":"Internal error"},"id":1,...} -throw 500 {"error":{"code":-32603,"message":"Internal error"},"id":1,...} -exit 500 {"error":{"code":-32603,"message":"Internal error"},"id":1,...} -gexit 500 {"error":{"code":-32603,"message":"Internal error"},"id":1,...} -kill -``` - -`gexit` is a real `GenServer.call` timeout. All four now carry a body. `kill` still returns -nothing — nothing can answer from a process that no longer exists — so if the CHANGELOG says -"all three", keep it to the three; `Process.exit(self(), :kill)` is outside what `catch` covers. - -## Finding 3 (non-map `_meta`) — FIXED - -`http.ex:298-304`. `"_meta":"x"` and `"_meta":[1]` → `400`, `-32020`, -`"_meta must be a JSON object when present"`. `"_meta":null` still passes to 200. Closed. - ---- - -# Part 2 — new findings in the round-2 code - -## R2-1. HIGH — the crash class this round was convened to close is reintroduced at three new sites in the new header validation - -The `Mcp-Method` / `Mcp-Name` validation added this round reaches into attacker-controlled JSON -without checking its shape, in `check_headers/2` at `:162` — which runs in `call/2`, **outside** -`dispatch/3`'s `rescue`/`catch`. Bare empty 500, stacktrace in the log, exactly what finding 3 -was about. - -``` -params is a string HTTP/1.1 500 Internal Server Error (no body) -params is an array HTTP/1.1 500 Internal Server Error (no body) -params is a number HTTP/1.1 500 Internal Server Error (no body) -params.name is a map HTTP/1.1 500 Internal Server Error (no body) -method is a map HTTP/1.1 500 Internal Server Error (no body) -_meta version is a map HTTP/1.1 500 Internal Server Error (no body) -``` - -Three distinct sites, from the log: - -``` -** (FunctionClauseError) no function clause matching in Access.get/3 - lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.check_name_header/3 - lib/beam_mcp/transport/http.ex:274: BeamMCP.Transport.HTTP.check_headers/2 - lib/beam_mcp/transport/http.ex:162: BeamMCP.Transport.HTTP.call/2 - -** (ArgumentError) the Access module supports only keyword lists (with atom keys), got: "name" - lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.check_name_header/3 - -** (Protocol.UndefinedError) protocol String.Chars not implemented for Map - lib/beam_mcp/transport/http.ex:347: BeamMCP.Transport.HTTP.check_standard_header/4 - lib/beam_mcp/transport/http.ex:316: BeamMCP.Transport.HTTP.compare_versions/3 -``` - -- `:355` — `get_in(message, ["params", "name"])`. `params` is any JSON value; a string, array or - number is not `Access`-able. This is the identical construct to the one you just removed from - `:212`, moved to a new line. -- `:347` — `"...does not match body value '#{body_value}'"` where `body_value` is - `message["method"]` or `params["name"]`. A map has no `String.Chars`. -- `:316` — the same interpolation on `_meta`'s protocol version. - -The guard at `:298-304` fixed the container. These three fix nothing about the *values*, and the -suite does not reach them: **no test in `http_test.exs` sends a non-map `params`, a non-string -`method`, or a non-string `_meta` version** (`grep -c '"params" => "'` → 0). 82 green tests, three -open crash paths. - -**What a host experiences.** `{"params":"x"}` with otherwise valid headers is a stacktrace per -request and a bodyless 500, at will, pre-tool-dispatch. Same as finding 3, one round later. - -## R2-2. HIGH — the host's `authorize/1` callback has no crash handling at all - -`http.ex:159` calls `authorize/2`, whose `:206` invokes the host's function. It is not inside -`dispatch/3`'s `rescue`/`catch`. - -``` -x-auth: deny 403 {"error":{"code":-32600,"message":"Forbidden"},...} (reason logged, not leaked) -x-auth: bogus 403 {"error":{"code":-32600,"message":"Forbidden"},...} (fail-closed, good) -x-auth: raise 500 (no body) -x-auth: throw 500 (no body) -x-auth: exit 500 (no body) -``` - -``` -** (RuntimeError) authorize exploded AUTHSECRET - lib/beam_mcp/transport/http.ex:206: BeamMCP.Transport.HTTP.authorize/2 - lib/beam_mcp/transport/http.ex:159: BeamMCP.Transport.HTTP.call/2 -``` - -This is finding 2's shape on the *other* host callback, and the comment at `:362-365` states the -reasoning that applies to it verbatim: "`GenServer.call` timing out EXITS, which is the shape a -host that calls a backend hits first". An `authorize/1` that checks a session store, Redis, or a -database is exactly a host calling a backend — and it runs on the one branch that is by -definition unauthenticated, so this is the callback an attacker can reach without credentials. -The `other ->` clause at `:214-221` shows you already thought about `authorize` returning -something wrong; returning *nothing at all* is the commoner failure. - -Leak check passed: `AUTHSECRET` / `SECRETAUTHREASON` appear 4× in the log and 0× in any response -body. The `:201-204` fix holds. - -## R2-3. MEDIUM-HIGH — the `authorize/1` contract makes body-based authentication structurally impossible, and it fails as a 15-second timeout - -`authorize` at `:159` runs **before** `read_body_bounded` at `:160`, and its contract returns only -`:ok | {:error, term()}` — there is no channel for the host to hand back the conn it read from. -So a host that authenticates the way this kind of endpoint is normally authenticated — an HMAC -over the request body — must call `read_body` itself, and then cannot return the consumed conn. - -Measured, with an `authorize` that reads the body and returns `:ok`: - -``` -pad=100 0.00s HTTP/1.1 200 OK -pad=16000 15.01s HTTP/1.1 408 Request Timeout -pad=200000 15.00s HTTP/1.1 408 Request Timeout -``` - -and on a keep-alive connection both the 16 KB and 200 KB cases time out on req1 *and* req2. The -server-side log confirms the host's read succeeded (`AUTHORIZE READ 200130 BYTES`); the -transport's own `read_body` then waits 15 s for bytes that are gone. - -Small bodies pass because they were already in the adapter buffer — the same size-dependence that -hid finding 1, so this will read as "works" in any test written the way the current ones are. - -**What a host experiences.** A correct, conventional signature-verifying `authorize/1` turns -every request over ~16 KB into a 15-second hang and a 408. Nothing in the moduledoc says the -callback must not touch the body. Either say so in the `:authorize` contract at `:33-34`, or let -it return `{:ok, conn}`. - -## R2-4. MEDIUM — an unknown *tool* now answers 404, which is what tells a client the endpoint is gone - -`http.ex:393-396` maps any `-32601` to 404. That is right for an unimplemented method. It also -catches `Unknown tool:`, which `server.ex:222` emits with the same code: - -``` -unknown METHOD 404 {"error":{"code":-32601,"message":"Method not found: no/such/method"}} -unknown TOOL 404 {"error":{"code":-32601,"message":"Unknown tool: nosuchtool"}} -``` - -The comment at `:394-395` gives the reason for the mapping — a client's transport-fallback -algorithm reads the status. By that reasoning, answering 404 to a well-formed `tools/call` for a -tool that happens not to exist tells that algorithm the *endpoint* is absent, and a client can -abandon a working endpoint because it asked for a tool name it got wrong. Discriminate on -something narrower than the code, or have the core distinguish the two. - -## R2-5. LOW — a JSON array of small integers is rendered as text in `-32020` messages - -Same interpolation sites as R2-1. `"method": [1]` does not crash; it produces - -``` -mcp-method header 'tools/list' does not match body value '<0x01>' -``` - -because a list of small integers is a charlist. `[104,105]` would report the body value as `hi`. -Harmless, but the error message asserts something about the request that is not true. - ---- - -# Part 3 — the three items you escalated, with reasoning - -## E1 — no `read_timeout` passed to Bandit. **Not blocking.** And I have to correct myself first. - -**My round-1 characterisation was wrong.** I wrote that a slow-drip client is "held for as long -as the client keeps trickling under the timeout". It is not. I only watched 10 s. Measured -properly this round, at two drip rates: - -``` -drip 1.0s/byte: server answered at 15.0s -> HTTP/1.1 408 Request Timeout -drip 0.2s/byte: server answered at 15.0s -> HTTP/1.1 408 Request Timeout -``` - -**15.0 s is a whole-body deadline, not a per-read reset.** A client cannot extend it by dripping -faster. Withdraw the round-1 sentence. - -**Which default, and what it is.** Bandit's, not the package's: -`deps/bandit/lib/bandit/http1/socket.ex:251`, `:302`, `:333` — `Keyword.get(opts, :read_timeout, -15_000)`. `http.ex:226` passes only `length:`, so it inherits 15 000 ms. Plug documents the same -default at `plug/lib/plug/conn.ex:1167-1168`. It is overridable per call: -`read_body(conn, length: …, read_timeout: …)`. - -**What it costs.** I opened slow connections that declare a body and never finish it: - -``` -5,000 held +43 MiB (8.8 KiB/conn) legitimate request while held: 200 OK in 0.00s -16,500 held +243 MiB (15.1 KiB/conn) legitimate request while held: 200 OK in 0.00s -28,229 held +198 MiB (7.2 KiB/conn) -- my client ran out of loopback ephemeral ports here -``` - -I could not find the server's refusal point: at 28,229 the limit I hit was my own client's source -ports, not Bandit's acceptance. Service was not degraded at 16.5k held. - -**Why it is acceptable to ship.** The bound exists, it is 15 s, it comes from a dependency default -the package inherits rather than defeats, and the resource a slow client can pin is ~15 KiB of -connection state with no measured effect on other callers. The package is not introducing an -unbounded hold. What it should do is **document the number** — because a host that wants a -different one needs to know the knob is `read_body`'s `:read_timeout`, that the package currently -does not pass it, and that 15 s is what it gets by default. That is a doc change. If you would -rather make it explicit in code, passing `read_timeout: 15_000` at `:226` changes no behaviour and -makes the inherited value visible; I would not block on either. - -## E2 — no aggregate body bound. **This one should not ship silently.** Blocking as documentation. - -**N concurrent requests, each a body of exactly 1,048,574 bytes (the cap), each held in dispatch -so its body stays resident. RSS of the BEAM, sampled while in flight:** - -``` -N delta RSS per request all succeeded -1 +2.0 MiB 2048 KiB 1/1 -10 +19.9 MiB 2037 KiB 10/10 -50 +87.9 MiB 1801 KiB 50/50 -100 +104.3 MiB 1068 KiB 100/100 -250 +275.3 MiB 1128 KiB 250/250 -500 +442.3 MiB 906 KiB 500/500 -1000 +972.5 MiB 996 KiB 1000/1000 -2000 +1.92 GiB 983 KiB 2000/2000 -4000 +4.31 GiB 1102 KiB 4000/4000 -8000 +8.16 GiB 1044 KiB 8000/8000 -``` - -Linear at ~1.05 MiB of RSS per in-flight at-cap request, **no plateau, nothing refused**. 8,000 -concurrent well-formed requests cost 8.16 GiB and all 8,000 got 200 OK. - -**Where it stops being fine is a function of the connection ceiling, and I had that wrong in round -1 too.** I said "~16k". From source: `deps/thousand_island/lib/thousand_island.ex:130-137` — -`num_connections` is **per acceptor**, and "the maximum number of concurrent connections for the -server is `num_acceptors * num_connections`". Defaults are `num_connections: 16_384` -(`server_config.ex:36`) and `num_acceptors: 100` — verified live on this tree, the acceptor pool -has exactly 100 children. **The default ceiling is 100 × 16,384 = 1,638,400 concurrent -connections**, which at the measured 1.05 MiB each is ~1.7 TiB of at-cap bodies. There is no -aggregate bound from the package, and none in practice from Bandit's defaults either. - -**Why I would not have the package add a limiter.** A library that silently caps a host's -concurrency is worse than one that does not: the host owns its capacity planning, and a cap the -package picks is a number it cannot keep, in exactly the sense the moduledoc already argues for -`authorize` and `allowed_origins`. So the code is right and the documentation is not. - -**What `README.md` must say for a host to get this right** — it currently says only "Request -bodies are capped at 1 MiB", which reads as a resource bound and is not one: - -1. The cap is **per request**, and memory is **~1 MiB per request in flight**, measured — so the - memory ceiling is that times the concurrency the host permits. -2. The concurrency the host permits defaults to `num_acceptors × num_connections` = - **1,638,400**, and setting it is the host's job (`Bandit.child_spec(thousand_island_options: - [num_connections: …])`). -3. `@max_body_bytes` is a **floor on what is read**, not a ceiling: measured read-before-refusal - was up to **1,769,325 bytes** for a declared 32 MiB body — Plug's `:length` is a threshold, and - Bandit reads in chunks past it. - -That is the answer the owner needs to be able to give deliberately: *the package bounds one -request; nothing bounds the sum; here is the host setting that does.* - -## E3 — non-encodable dispatch payloads become 500. **Not blocking.** - -Re-measured on this tree: - -``` -{:ok, {:a, :b}} 500 {"error":{"code":-32603,"message":"Internal error"},"id":1,...} -{:ok, %{"pid" => self()}} 500 {"error":{"code":-32603,"message":"Internal error"},"id":1,...} -``` - -Keep-alive survives both (verified in the Part 1 matrix). No detail leaks. `Jason.EncodeError` -reaches the log with the offending value. - -**Why it is acceptable to ship.** It is a host bug — returning a term that is not JSON from a -callback whose contract is a JSON-RPC result — and every property that matters holds: it is -caught, the answer is well-formed JSON-RPC, the connection is not poisoned, the caller learns -nothing about the host, and the host learns everything from the log. Nothing about it is a -resilience defect. - -What is imperfect is the *label*. The host is told "Internal error" where "your tool returned a -term I cannot encode" would save it a debugging session, and the client is told the server failed -where `"isError": true` would be truer to what happened. That is diagnosability, and it is also -genuinely arguable the other way: `tool_failure/1` is for a tool *reporting* failure, and a -payload the transport cannot serialise is a contract violation rather than a tool outcome, so 500 -is defensible. I would file it, fix it when convenient, and note that the fix belongs at -`server.ex:264` (`tool_success/1`) rather than in the transport — the transport cannot tell an -unencodable payload from any other raise once it is in the rescue. - ---- - -# Part 4 — re-run and unchanged - -Recorded so it is not re-run again. All against this tree. - -- **Malformed input answers rather than crashing**, except R2-1: empty body, whitespace, invalid - JSON, bare `null`/number/string, `[]`, lone surrogate, raw invalid UTF-8, `NUL` in a string, - duplicate keys, `id` as an object, no `method` key — all a JSON-RPC answer. -- **Depth and size**: 260,000-deep nested arrays, 100,000-deep nested objects, a 1 MB single - string, 50,000 duplicate keys — all 200 OK in ≤ 0.03 s. -- **Cap boundary**: 1 MiB − 1024 → 200; exactly 1 MiB → 200; 1 MiB + 1 → 413; 4 MiB → 413; - 32 MiB → 413. Chunked encoding capped identically. -- **Lying `Content-Length`**: over-declared → 408 at 15.00 s (see E1); under-declared → 400 parse - error. -- **Concurrency**: 100 / 500 / 1000 concurrent `tools/call` with distinct ids and distinct echoed - arguments — 0 crossed, 0 mismatched, 1000 in 0.17 s. -- **Supervision**: killed the Bandit supervisor, `ThousandIsland.Listener`, - `acceptor_pool_supervisor` and `shutdown_listener` in turn under a host `one_for_one`; every one - restarted and the next request was 200 OK. A raising handler leaves the tree untouched. -- **Methods**: all eight non-POST verbs → 405, now with `allow: POST`. Good addition. -- **Content-Type is still not validated** (`text/plain`, form-encoded, absent all reach dispatch) - and **the path is not checked** (`/`, `/admin`, `/../../etc/passwd` all 200). Both are r1's lane - — Plug hosts route, and the moduledoc's "at one endpoint" is about the protocol not the router. - Noting, not filing. - ---- - -## What blocks - -R2-1 and R2-2 are the same defect class this round was convened to close, at four new lines, and -none of the four is reachable by the suite. R2-3 breaks a conventional host implementation into a -15-second hang. E2 needs three sentences in `README.md` so the owner is stating the position -rather than discovering it. - -R2-4 I would want fixed but would not hold the release for. R2-5, E1 and E3 are file-and-move-on. - -VERDICT: changes required diff --git a/slices/002-streamable-http/logs/round2.s1.md b/slices/002-streamable-http/logs/round2.s1.md deleted file mode 100644 index 41da4ec2..00000000 --- a/slices/002-streamable-http/logs/round2.s1.md +++ /dev/null @@ -1,294 +0,0 @@ - - -From: beam_mcp · Security lane s1 -To: beam_mcp · Coding Agent -Re: slice 002-streamable-http, round 2, HTTP attack surface -Type: Report - -**Tree reviewed:** `a5cfb67b8a8854714cde36522292c9fc57e96d6a` -(`git write-tree` in `/home/aylac/Projects/beam_mcp-wt/002-review2`, clean index, also written -to `logs-s1.tree` there). Delta reviewed against `babfc5e40…`. Gate green here too: -`mix test` → **82 tests, 0 failures**; `./tools/gate.sh` → **Gate OK**. - -Same method as round 1: real `Bandit` listeners on `127.0.0.1`, raw `:gen_tcp` client, exact -bytes on the wire. - -**Both round-1 blockers are fixed and I verified them by re-running the exploits.** Every other -fix you listed I also re-ran; all hold. You asked me to attack `check_headers/2` specifically -and to find a way past it before a consumer does. I did not get past it — but I crashed it, -eight ways, and the two blocking findings below are both round-1 findings that were fixed -*pointwise* and have come back *as a class* inside the new code. - ---- - -## Confirmed fixed (I re-ran each exploit against this tree) - -| round 1 | verification on `a5cfb67` | -|---|---| -| **1 — `inspect(reason)` leak** | Same planted payload (`%{expected_bearer: "s3cr3t-token-abc", db: "postgres://user:pw@10.0.0.5/prod"}`) → `403 {"error":{"code":-32600,"message":"Forbidden"},...}`. Grepped the full response: `s3cr3t` **false**, `postgres` **false**. Reason present in the log only. `http.ex:205-212`. | -| **2 — non-map `_meta` bare 500** | `"x"`, `7`, `[1,2]`, `true` → all `400` `-32020` "`_meta` must be a JSON object when present". `http.ex:298-304`. | -| **3 — `throw`/`exit` uncaught** | `raise` / `exit(:SECRET_exit_reason)` / `throw(:SECRET_thrown)` → all three now `500` with `{"error":{"code":-32603,"message":"Internal error"},"id":1,...}`, and `SECRET` absent from every body. `http.ex:376-379`. | -| **4 — first `Origin` only** | `Origin: https://app.example.com` + `Origin: https://evil.com` → **403** (was 200). Reversed → 403. Absent → passes. Case, trailing slash, trailing space, `null` → 403. `http.ex:181-191`. | -| **7 — `authorize` returning `false`** | `403 Forbidden` + `Logger.error`, no `WithClauseError`, no bare 500. `http.ex:214-221`. | -| **10 — README era vs lifecycle** | Read the new text; it now says what the code does. Good. | -| **11 — `init_mode: :runtime`** | Documented at `http.ex:42-46`, and the guarantee stated there ("before any message is handled") is the one that actually holds in both modes. Agreed, no change wanted. | -| **keep-alive on refusal paths** | The one I most wanted to check, since your diagnosis differs from your old changelog. Eight refusal paths, 16 KB bodies, two requests down one socket: `403 origin`, `403 authorize`, `400 bad JSON`, `400 array body`, `400 missing Mcp-Method`, `400 header mismatch`, `404 unknown method` — **second request answered normally in every case**. `413` closes the socket by design (`Connection: close`, `http.ex:411`), second request `{:error, :closed}`, which is correct. | - -Also re-verified unchanged from round 1: contract evasion refused on all seven wirings I tried -(`init([])`, partial options, no `tool_catalog`, bare Bandit module, `Plug.Builder` with no -opts, `Plug.Router` `forward` with no `init_opts`); body cap still exact (1 048 576 served / -1 048 577 → 413); 40 concurrent 1 MiB bodies → all answered in 24 ms with no shared state; the -`Allow: POST` header is a nice addition on the 405. - ---- - -## 1. BLOCKING — `check_headers/2` and the refusal path sit outside every rescue, and eight inputs crash them into the bare empty 500 you just eliminated - -This is round-1 finding 2. `_meta` was fixed at `http.ex:298-304`; the **class** was not. The -new `check_headers/2` (`http.ex:269-358`) reaches into attacker-shaped JSON, string-interpolates -attacker-supplied values, and JSON-encodes attacker-supplied header bytes — and none of it is -inside the `rescue`/`catch` at `http.ex:372-380`, which wraps only `do_dispatch/3`. The `else` -clause at `http.ex:164-166` matches `{:refused, …}` and nothing else, and `send_json/3` -(`http.ex:403-407`) is called from it, also unprotected. - -Eight reproducers, one listener (`authorize: fn _ -> :ok end`, the documented "accept every -caller"), every response `HTTP/1.1 500 Internal Server Error` with an **empty body**: - -**(a) `params` is not a map — `get_in/2` at `http.ex:355`** - -``` -POST /mcp MCP-Protocol-Version: 2026-07-28 Mcp-Method: tools/call Mcp-Name: echo -{"jsonrpc":"2.0","id":1,"method":"tools/call","params":"x"} -``` -→ `500`, empty body. Log: -``` -** (FunctionClauseError) no function clause matching in Access.get/3 -``` -Same with `"params":[1,2]` (`ArgumentError`, "the Access module supports only keyword lists") -and `"params":7` (`FunctionClauseError`). `check_name_header/3` does exactly what -`body_protocol_version/1` was written to stop doing, three functions further down the same -module. - -**(b) a non-string body value interpolated into the mismatch message — `String.Chars`** - -`http.ex:347` (`"#{header_name} header '#{value}' does not match body value '#{body_value}'"`) -and `http.ex:316` (same shape for the version). - -``` -Mcp-Method: x -{"jsonrpc":"2.0","id":1,"method":{"a":1}} -``` -→ `500`, empty. `** (Protocol.UndefinedError) protocol String.Chars not implemented for Map` - -``` -Mcp-Method: ping -{"jsonrpc":"2.0","id":1,"method":"ping","_meta":{"io.modelcontextprotocol/protocolVersion":{"a":1}}} -``` -→ `500`, empty. Same exception, from `http.ex:316`. `_meta` being a map is now checked; the -**value at the version key** is not, and it is any JSON value. - -``` -… "_meta":{"io.modelcontextprotocol/protocolVersion":[{"a":1}]} -``` -→ `500`, empty. `** (ArgumentError) cannot convert the given list to a string` - -``` -Mcp-Method: tools/call Mcp-Name: echo -{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":{"a":1}}} -``` -→ `500`, empty. `Protocol.UndefinedError`, from `http.ex:347` via `check_name_header/3`. - -**(c) invalid UTF-8 in a validated header — `Jason.EncodeError` inside `send_json/3`** - -Two bytes on the wire. Header values are octets; nothing validates them, and both the `-32022` -payload (`"requested" => header`, `http.ex:330`) and the interpolated mismatch string carry them -into `Jason.encode!`. - -``` -MCP-Protocol-Version: \xFF\xFE -Mcp-Method: ping -{"jsonrpc":"2.0","id":1,"method":"ping"} -``` -→ `500`, empty. `** (Jason.EncodeError) invalid byte 0xFF in <<255, 254>>` - -``` -MCP-Protocol-Version: 2026-07-28 -Mcp-Method: \xFF\xFE -``` -→ `500`, empty. `Jason.EncodeError`, the whole mismatch sentence in the log. - -``` -Mcp-Name: \xFF\xFE (on tools/call) -``` -→ **no response at all**; connection closed. - -Control: the same request with `MCP-Protocol-Version: 1999-01-01` gives the correct -`400 -32022`. And a body-sourced `id` is safe — `Jason.decode` rejects invalid UTF-8 first -(`{"id":"\ud800"}` → `400 -32700`), so this is specifically the header path. - -**What an attacker gains:** the same three things as round 1, now via the code added to close -round 1. (a) The "every refusal is a JSON-RPC error" property is false again, for inputs -cheaper than any test covers — two header bytes, or one JSON scalar in the wrong place. -(b) An unhandled exception escapes the Plug into the host's error handling; a host that wraps -this in `Plug.Debugger` for dev renders stacktrace and source into the response. (c) A free -formatted-stacktrace log-flood primitive at ~60 bytes a request. The `Mcp-Name` case does not -even produce a status line. - -**The pointwise fix is not the fix.** Three suggestions, in order of how much I trust them: - -1. Wrap the whole of `call/2` — not just `do_dispatch/3` — in the existing `rescue`/`catch`, - emitting the same detail-free `-32603`. That converts this entire class, including the ones - I have not thought of, into the answer the module already gives for host crashes. -2. In `check_standard_header/4` and `compare_versions/3`, render non-binary body values with - `inspect/1`, never interpolation; and reject a `_meta` version value that is not a string the - way `body_protocol_version/1` already rejects a non-map `_meta`. -3. Reject a header value that is not valid UTF-8 (`String.valid?/1`) as a `400 -32020` before it - can reach `Jason.encode!`; and reject a non-map `params` on `tools/call` the same way. - -## 2. BLOCKING — `Mcp-Method`, `Mcp-Name` and `MCP-Protocol-Version` validate only the *first* header value - -`http.ex:335-350` (`[value | _]`) and `http.ex:282` (`List.first/1`). - -This is round-1 finding 4, which you fixed for `Origin` in this round with `Enum.all?` — and the -new headers land the same bug in the one place where the spec states the attack as its reason. -Your own comment at `http.ex:260-264` quotes it: - -> *This prevents potential security vulnerabilities when different components in the network -> rely on different sources of truth (e.g., a load balancer routing on the header value while -> the MCP server executes based on the body value).* - -Two `Mcp-Method` values is precisely "different components relying on different sources of -truth". Measured: - -``` -POST /mcp -MCP-Protocol-Version: 2026-07-28 -Mcp-Method: tools/call -Mcp-Method: ping -Mcp-Name: echo -{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"echo","arguments":{}}} -``` -→ `HTTP/1.1 200 OK`, **`tools/call` executed**. - -``` -Mcp-Name: echo -Mcp-Name: evil -… body params.name = "echo" -``` -→ `200 OK`, `echo` executed. - -``` -MCP-Protocol-Version: 2026-07-28 -MCP-Protocol-Version: 1999-01-01 -``` -→ served (the second is ignored). - -**What an attacker gains:** desync with any intermediary that resolves duplicate headers to the -last value, or joins them — which is the documented behaviour of several proxies, and the -attack the MUST exists to prevent. A gateway that authorises or routes on `Mcp-Method: ping` -forwards a request this server executes as `tools/call`. Note that with `Origin` the direction -of the bug was fail-open only in one order; here the *first* value is the one that has to -match the body, and an attacker controls both, so they can always satisfy this server while -presenting whatever they like to the hop in front. - -Same one-line shape as the `Origin` fix: require every value to match, and treat more than one -distinct value as a mismatch. `Enum.all?(get_req_header(conn, header_name), &(&1 == body_value))` -with `[]` still "missing", and the same for the version header. - -## 3. NON-BLOCKING — the new `404` is too broad: an unknown *tool* is not an unimplemented *method* - -`http.ex:393-396` matches `%{"error" => %{"code" => -32_601}}` anywhere in the response. But -`server.ex:224` also returns `-32601` for `"Unknown tool: #{name}"`, which is a *valid, -implemented* method (`tools/call`) with a bad parameter. Measured: - -| request | status | body | -|---|---|---| -| `{"method":"frobnicate"}` | `404` | `-32601 Method not found: frobnicate` — correct | -| `tools/call` naming a tool that does not exist | **`404`** | `-32601 Unknown tool: nosuch` | -| `ping` at the modern era | `404` | `-32601 Method not found: ping` — correct | - -The spec paragraph you implemented says the `404` exists so the JSON-RPC body *"distinguishes -this case from a `404` returned by a legacy HTTP+SSE server that does not host the modern MCP -endpoint"* — i.e. a client's transport-fallback algorithm reads the status. A typo in a tool -name now tells that client the endpoint may not be there. Match on the *method* being -unimplemented rather than on the code, or have the core distinguish "unknown tool" from -"unknown method" with different codes. - -## 4. NOTE — `Mcp-Method` is required on notification POSTs, which the revision explicitly leaves undefined - -`check_standard_header/4` is called unconditionally from `check_headers/2` (`http.ex:273`). -Measured: `{"jsonrpc":"2.0","method":"notifications/initialized"}` with the header → `202`; -without it → `400 -32020`. Your own archived spec at -`logs/spec-streamable-http.md:100-104` says *"header requirements for notification POSTs are -not defined by this revision."* Being stricter is defensible and the moduledoc table -(`http.ex:54`) says accurately what it does — but it is a deliberate choice about a case the -spec declines to define, and it will refuse notifications a conformant client is entitled to -send. Worth one sentence saying it is a choice. - -## 5. NOTE — the new `:tool_catalog` check is truthiness only - -`http.ex:135-138`. `init(tool_catalog: "junk", authorize: …, allowed_origins: …)` returns a -working config; the failure arrives per request as a `500 -32603`. The two checks it sits -between verify shape (`is_function/2`, `is_list` + `Enum.all?`); this one verifies only that the -value is not `nil`/`false`. `Code.ensure_loaded?/1` plus a -`function_exported?(mod, :all, 0)` check would make it the same kind of thing as its neighbours. - ---- - -## Your two open questions — my answer: neither blocks - -**Round-1 finding 5 (a body-reading `:authorize`).** Does not block, and I would not restructure -the pipeline for it. The exposure is a host that reads the body inside `authorize` to do -per-tool policy and gets a size-dependent endpoint (works at 93 bytes, no response at 100 KB). -That is a documentation hole, not a defect in these bytes: one sentence on the `:authorize` -option saying it must not read the body, and that per-tool policy belongs in the host's -`dispatch`, closes it completely. I would rather have the sentence than a bigger `call/2`. - -**Round-1 finding 6 (no path check).** Does not block. It is host wiring, and a host that wants -one path mounts the Plug behind a router. If you want the moduledoc's first line ("at one -endpoint") to be literally true of the documented usage, the `Bandit.child_spec` example could -show the `Plug.Router` `forward` form instead — cosmetic, and I would not spend the slice on it. - ---- - -## Attacks that failed this round - -Everything in round 1's "attacks that failed" list, re-run and still failing, plus: - -- **Getting past `check_headers/2`.** No bypass found. `Mcp-Method` must equal the body's - `method` and `Mcp-Name` must equal `params.name` for `tools/call`, both exact-string, no - case folding, no normalisation; a missing header is a `400`, not a skip; `check_name_header/3` - cannot be dodged by changing the method, because the method itself is pinned to the header - one line earlier. Duplicate values (finding 2) are a desync against *intermediaries*, not a - way to make this server execute something its own headers did not describe. -- **Era forgery**, again: missing / `1999-01-01` / body-`_meta` disagreeing → `400` `-32020` or - `-32022`; `do_dispatch/3:386-387` still overwrites `_meta` unconditionally, so no non-modern - or absent era reaches `handle_message/2`. -- **id-less `tools/call`** → `202`, no dispatch (`server.ex:242` catch-all). Still no path from - a notification to host code. -- **`tools/call` with no `params`** → `400 -32020` on `Mcp-Name`, before the core. -- **Information disclosure to an unauthenticated caller**: the only things reachable before - `authorize/1` are the `403 Origin not allowed`, the `405` with `Allow: POST`, and the - detail-free `403 Forbidden`. Nothing else. The crash class in finding 1 is *behind* - `authorize`, exactly as in round 1 — which matters only as much as `authorize: fn _ -> :ok end` - is common, and for a localhost MCP server it is the documented default posture. - ---- - -## Summary - -The two round-1 blockers are genuinely closed, the `throw`/`exit` and `Origin` fixes are right, -and the keep-alive diagnosis is correct — I confirmed it across eight refusal paths with bodies -large enough to expose it. The new header validation is good work and I could not get past it. - -What I would say to the coding agent, plainly: both blockers this round are the same two -findings from last round, fixed at the site and not at the class. `_meta` no longer crashes; -`params`, the `_meta` version value, `method`, `params.name` and three header values all still -do, and they all crash in the region of `call/2` that has no rescue at all — which is why I -would spend the fix on wrapping `call/2` rather than on five more guards. `Origin` now checks -every value; the three headers added in the same commit check the first. - -VERDICT: changes required diff --git a/slices/002-streamable-http/logs/round3.r1.md b/slices/002-streamable-http/logs/round3.r1.md deleted file mode 100644 index 8a1148cc..00000000 --- a/slices/002-streamable-http/logs/round3.r1.md +++ /dev/null @@ -1,500 +0,0 @@ -# Round 3 — review lane r1 (correctness and test quality) - -Tree read: `ebaaed0d918fed52e20af9031a1a8a71158bd3c9` (`git rev-parse HEAD^{tree}`, matches the -brief; recorded in `logs/round3.r1.tree`). - -Scope: `git diff a5cfb67b8a8854714cde36522292c9fc57e96d6a HEAD` — 13 files, 1845 insertions. - -**VERDICT: changes required** - -All 13 recorded mutants reproduced exactly as recorded — counts and killing test names. The -problems are not in the table; they are in what the table does not cover, in one new code path -that does not survive a real host, and in two places where the record misdescribes its own -derivation. - ---- - -## Method - -All probes ran in a copy, never in the working tree: -`cp -a` of the worktree to -`/tmp/claude-1000/-home-aylac-Projects-hacktui-hermes/775c8d71-6ac1-4653-8798-382001e76089/scratchpad/lane-r1`, -with `.git` and `_build` removed (`git init` re-run inside the copy only so -`tools/probe_optional_deps.sh`, which calls `git rev-parse --show-toplevel`, resolves to the copy). -Harness at `$SCRATCH/mut/harness.py`: for each mutant it asserts a pre-count of exactly 1 for -every pattern, applies, asserts the mutated text is present, runs `mix test`, records failures by -name, restores, and re-asserts the restore. A pre-count other than 1 is reported NOT APPLIED and -never scored. A run with no `N tests, M failures` line is reported COMPILE ERROR and never scored -as a kill or a survivor. - -Baseline in the copy, before and after the whole run: **101 tests, 0 failures**. Source verified -byte-identical to the worktree afterwards (`diff` clean). The working tree's index was never -touched; `git write-tree` still yields the tree above. - -`mutation.md`'s first batch was measured at 98 tests, the second at 101. The current tree is 101, -so my counts read `/101` throughout. Kill *counts* are what I compare. - ---- - -## The 13 recorded mutants, re-run - -| # | mutant | recorded | my re-run | killing test names agree? | -|---|--------|----------|-----------|---------------------------| -| 1 | `Origin`: `Enum.all?(origins, …)` → first value only | KILLED 1/98 | **KILLED 1/101** | yes — `Origin — a second, disallowed Origin is not ignored` | -| 2 | `MCP-Protocol-Version`: `header_values(…)` → `Enum.take(…, 1)` | KILLED 1/98 | **KILLED 1/101** | yes — `MCP-Protocol-Version — a second, unsupported version is not ignored` | -| 3 | `Mcp-Method` call site → first-value-only scaffold | KILLED 1/98 | **KILLED 1/101** | yes — `Mcp-Method — a second, disagreeing method is not ignored` | -| 4 | `Mcp-Name` call site → first-value-only scaffold | KILLED 1/98 | **KILLED 1/101** | yes — `Mcp-Name — a second, disagreeing name is not ignored` | -| 5 | `Mcp-Param-{Name}` call site → first-value-only scaffold | KILLED 1/98 | **KILLED 1/101** | yes — `Mcp-Param-{Name} — a second, disagreeing value is not ignored` | -| 6 | `all_match?/2`: `Enum.all?` → `Enum.any?` | KILLED 3/98 | **KILLED 3/101** | yes — the `Mcp-Method`, `Mcp-Name` and `Mcp-Param-{Name}` multi-value tests, exactly those three | -| 7 | `check_param_headers/3` sweep disabled | KILLED 3/98 | **KILLED 3/101** | yes — the multi-value param test and both `x-mcp-header` contract tests | -| 8 | `decode_header_value/1` base64 clause made a no-op | KILLED 1/98 | **KILLED 1/101** | yes — `an RFC-2047-style Base64 Mcp-Name is decoded before comparison` | -| 9 | 404 keyed on `-32601` again (+ attribute removed) | KILLED 1/98 | **KILLED 1/101** | yes — `an unknown tool is 200 with a JSON-RPC error, not 404` | -| 10 | outer `rescue`/`catch` removed from `call/2` (+ `crash_response/1`) | KILLED 1/101 | **KILLED 1/101** | yes — `a host authorize/1 that raises, throws or exits is answered…`, and **only** that one; the latin-1 test does not fire, as recorded | -| 11 | `param/2` fallback removed, non-map `params` reached into | KILLED 1/101 | **KILLED 1/101** | yes — `a non-map params is refused, not reached into` | -| 12 | refusal message interpolates the raw body value again | KILLED 1/101 | **KILLED 1/101** | yes — `a non-scalar params.name is refused, not interpolated into a message` | -| 13 | `to_comparable/1` catch-all → the value itself | SURVIVED (equivalent) | **SURVIVED** | n/a — equivalence argument checked below and holds | - -**13/13 reproduced.** No mutant was NOT APPLIED; every pattern matched exactly once. - -### The compiler-kill claim, verified — and one case the record misses - -The record says mutants 9 and 10 needed a companion deletion or the build would fail under -`--warnings-as-errors`, and that a compiler kill would have been scored as a test kill. Both are -true, and I reproduced them by deliberately leaving the companion behind: - -- **9a** (`@method_not_found` left defined): `warning: module attribute @method_not_found was set - but never used` → `Compilation failed due to warnings while using the --warnings-as-errors - option`. No suite ran. -- **10a** (`crash_response/1` left defined): `warning: function crash_response/1 is unused` → - same failure. - -`mix.exs:14` sets `elixirc_options: [warnings_as_errors: true]`, so this applies to `mix test`, -not only to the gate's `mix compile` step. The record's caution is correct. - -**But mutant 7 is a third instance the record does not name.** Disabling the sweep orphans -`argument/2`, which nothing else calls: - -- **7a** (sweep disabled, `argument/2` left behind): `warning: function argument/2 is unused` → - compilation failed. Not a survivor, not a kill — no evidence at all. - -The recorded KILLED 3 for mutant 7 is right, so the *result* stands; the record's list of mutants -that needed a faithful companion deletion is incomplete. See finding **L-3**. - -### Mutant 13's equivalence argument — sound, with a dependency worth writing down - -The argument holds. `to_comparable/1`'s return is used in exactly two places: -`check_named/4:407` (as `expected`, consumed only by `all_match?/2:347`) and -`check_protocol_version/3:452`. `all_match?/2` compares `expected` against -`decode_header_value(&1)`, and both clauses of `decode_header_value/1` -(`http.ex:331` and `:344`) return a binary. The catch-all's inputs, after `Jason.decode/1`, can -only be a list or a map. Neither a list, a map, nor `:unmatchable` can `==` a binary, so both -versions refuse identically. In `compare_versions/3:473` the only test on the value is -`not is_nil(body_version)`, and neither a list/map nor `:unmatchable` is `nil`. Equivalent. - -Two things the record could add. First, the equivalence is *contingent* on -`decode_header_value/1` returning a binary; if a future clause returned an atom, `:unmatchable` -would start mattering and mutant 13 would still survive, so nothing would say so. Second, the -clause is not entirely unpinned — I ran **13a**, deleting the catch-all outright rather than -changing its return: - - 13a: to_comparable/1 catch-all clause DELETED → KILLED 1/101 - killed by: a non-scalar params.name is refused, not interpolated into a message - -so the function's *totality* is pinned (a list body value would otherwise raise -`FunctionClauseError` and become a 500); only its return *value* is free. That is a more -precise statement than "survived, equivalent" and it is worth having in the record. - ---- - -## HIGH - -### H-1 — `init/1`'s `Code.ensure_loaded?/1` makes the Plug uncompilable for a host whose catalog is in the same project - -`lib/beam_mcp/transport/http.ex:142-143` (new in this delta): - - unless is_atom(catalog) and catalog != nil and Code.ensure_loaded?(catalog) and - function_exported?(catalog, :all, 0) do - -`init/1` runs at **compile time** under Plug's default `init_mode` — the moduledoc says so itself -at `http.ex:42-46`. `Code.ensure_loaded?/1` does not wait for a module that the parallel compiler -is still working on; `Code.ensure_compiled/1` is the function that does. So a host writing the -ordinary shape — `plug BeamMCP.Transport.HTTP, tool_catalog: MyApp.Catalog, …` in a -`Plug.Builder`/`Plug.Router` module, with `MyApp.Catalog` in the same project — cannot compile. - -Observed. Throwaway consumer project at `$SCRATCH/inittest`, depending on the copy by path, with -a valid catalog (`def all, do: []`, `@behaviour BeamMCP.ToolCatalog`): - - $ mix compile - ==> host_probe - Compiling 2 files (.ex) - - == Compilation error in file lib/a_router.ex == - ** (ArgumentError) BeamMCP.Transport.HTTP requires a :tool_catalog option: a module - implementing the BeamMCP.ToolCatalog behaviour, that is, exporting all/0. - - Got: HostProbe.Catalog - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:144: BeamMCP.Transport.HTTP.init/1 - (plug 1.20.3) lib/plug/builder.ex:358: Plug.Builder.init_module_plug/4 - ... - exit=1 - -Expected: compiles, because `HostProbe.Catalog` *is* a module exporting `all/0`. Observed: an -`ArgumentError` naming the correct module as invalid, at build time, with a message that tells the -host to fix something that is not wrong. This is the same failure class as the bug the guard at -`http.ex:10` exists to prevent — a check that is correct in this tree and wrong in a consumer's — -and the delta added it without a consumer-side probe, even though it added -`tools/probe_optional_deps.sh` for exactly that class in the same diff. - -Fix — one line, verified: - - match?({:module, _}, Code.ensure_compiled(catalog)) and - -With that change the consumer project compiles (`exit=0`) and the delta's own init test is -unaffected: `mix test test/beam_mcp/transport/http_test.exs` → **51 tests, 0 failures**. `Enum`, -`true`, `"MyApp.Catalog"` and `:not_a_module` are all still rejected, because -`function_exported?/3` and the `is_atom` guard do that work. - -Worth adding to `tools/probe_optional_deps.sh` (or a sibling): the consumer project already exists -there; adding a `Plug.Builder` module that plugs the transport with a same-project catalog would -have caught this before the round. - -### H-2 — one header read is *not* pinned as all-values, which is the exact claim `mutation.md` makes - -`mutation.md`'s headline is "13 mutants, one per header read, proving each read is individually -pinned by a test", and the CHANGELOG repeats it: *"Every header is validated in all of its values, -not the first … one mutant per header proving each is pinned."* - -`compare_versions/3` has **two** value comparisons on the `MCP-Protocol-Version` header, not one: - - http.ex:473 not is_nil(body_version) and not all_match?(values, body_version) -> - http.ex:477 not Enum.all?(values, &(&1 == @modern_version)) -> - -Recorded mutant 2 pins the *first* one only. Line 477 is a separate all-values read and nothing -pins it: - - N3: `not Enum.all?(values, &(&1 == @modern_version))` - -> `not (List.first(values) == @modern_version)` - SURVIVED | 101 tests, 0 failures - -This is not an unreachable branch. Line 477 is the branch a request takes whenever the body has no -`_meta`, which is legal and normal — `do_dispatch/3:520` injects `_meta` precisely because a body -may omit it. Measured on the unmutated tree (probe `D1`), body -`{"jsonrpc":"2.0","id":1,"method":"tools/list"}` with headers -`mcp-protocol-version: 2026-07-28` **and** `mcp-protocol-version: 1999-01-01`: - - D1 (no _meta, dup version): status=400 - {"error":{"code":-32022,"data":{"requested":"2026-07-28","supported":["2026-07-28"]}, - "message":"Unsupported protocol version"},"id":1,"jsonrpc":"2.0"} - -So the code is correct today and refuses the second value. Under N3 it would accept and serve the -request, and the suite would stay green — the identical smuggling shape (satisfying value first, -hostile value second) that mutants 1–5 exist to close, on the one header that carries two reads. - -Fix: add a test sending duplicate `MCP-Protocol-Version` values on a body with **no** `_meta`, and -assert `-32022`; then add the mutant to the table. The recorded mutant 2 also deserves a note that -it pins the body-match branch, not the version-support branch (see **L-1**). - ---- - -## MEDIUM - -### M-1 — the notification exemption is new, relaxes a previously-enforced MUST, and no test touches it - -`http.ex:366-370` (new in this delta): - - defp check_method_header(conn, message, id) do - if Map.has_key?(message, "id"), - do: check_named(conn, "mcp-method", message["method"], id), - else: :ok - end - -At the round-2 reviewed tree the equivalent line was unconditional -(`a5cfb67:lib/beam_mcp/transport/http.ex:273`, `check_standard_header(conn, "mcp-method", -message["method"], id)`). The delta introduces the exemption. Nothing pins it: - - N1: `if Map.has_key?(message, "id"),` -> `if is_map(message),` (exemption removed) - SURVIVED | 101 tests, 0 failures - -The suite *has* a notification test — `test/beam_mcp/transport/http_test.exs:462`, "a notification -gets 202 and no body" — but it calls `post/1` with default headers, and `std_headers/1:52-54` adds -`{"mcp-method", "notifications/initialized"}` from the body whenever `body["method"]` is present. -So the one test that reaches the notification path supplies the very header the exemption exists to -waive, and the exemption branch is never executed by any test. That is a test passing without -exercising the behaviour it appears to cover. - -The behaviour it waives is observable (probe `D3`/`D3b`, unmutated tree). Same body, same headers, -the only difference being the `"id"` key: - - D3 (no "id", method tools/call, Mcp-Method: tools/list): status=202 body="" - D3b (with "id", identical otherwise): status=400 -32020 - "mcp-method header does not match the corresponding request body value" - -A POST whose `Mcp-Method` header disagrees with its body is accepted with 202 as long as it carries -no `id`. Nothing is executed today, because every `tools/call` clause in `BeamMCP.Server` requires -`"id"` and an id-less message falls through to `server.ex:242` `handle_message(state, _message) -> -{state, nil}`. So the safety of this exemption rests entirely on a coupling to the core — and that -coupling is unstated and untested, in a delta that elsewhere pins exactly this kind of coupling on -purpose (`test/…/http_test.exs:411`, "the core's wording that 404 keys on is pinned here"). - -Fix: a test that a notification POST with **no** `Mcp-Method` is accepted (the exemption's positive -case, which kills N1), and a test that an id-less `tools/call` reaches no dispatch (the coupling to -`server.ex:242`). If the exemption is meant to apply to notifications rather than to id-less -messages generally, key it on the method (`String.starts_with?(message["method"], -"notifications/")`) rather than on the absence of `id`. - -### M-2 — `check_param_headers/3` is only ever tested with one mirrored header - -`http.ex:390-403` reduces over every distinct `mcp-param-*` header. Every test in the delta sends -exactly one such header name, so the loop is never exercised past its first iteration: - - N9: insert `|> Enum.take(1)` after `Enum.uniq()` (validate only the first param header) - SURVIVED | 101 tests, 0 failures - -The behaviour is real and reachable (probe `D2`, unmutated tree): body arguments -`{"region":"eu-west1","user":"alice"}` with headers `mcp-param-region: eu-west1` (matching) and -`mcp-param-user: mallory` (not) → - - D2: status=400 {"error":{"code":-32020,"message":"Header mismatch: mcp-param-user header - does not match the corresponding request body value"},...} - -Under N9 that request is served. This is the same "a satisfying value first, a hostile one second" -shape as mutants 1–5, one level up — across headers instead of within one header — and it is the -shape a real mirrored-parameter deployment produces, since `x-mcp-header` can be set on more than -one property of a schema. - -Fix: a test with two distinct `mcp-param-*` headers where the first matches and the second does -not; add the mutant. - -By contrast the *halt* is pinned — I checked: - - N13: reduce_while never halts (last result wins) -> KILLED 3/101 - -### M-3 — `argument/2`'s fallback lets `Mcp-Param-{Name}` be satisfied by `params.{Name}` - -`http.ex:441-442`: - - defp argument(%{"params" => %{"arguments" => %{} = args}}, key), do: args[key] - defp argument(message, key), do: param(message, key) - -The second clause is unpinned: - - N6: `defp argument(message, key), do: param(message, key)` - -> `defp argument(_message, _key), do: nil` - SURVIVED | 101 tests, 0 failures - -and it changes the answer. `Mcp-Param-{Name}` is defined against a tool *argument*, but when -`params.arguments` is not a map the check silently compares against a *param* of the same name -instead. Probe `D4`, unmutated tree: body `params: {"name":"echo","arguments":"not-a-map"}`, header -`mcp-param-name: echo` → - - D4: status=200 ... "invalid arguments: arguments must be an object" ... - -Header validation **passed** — the transport's MUST was satisfied by `params.name`, a different -field from the one the header names — and the request went through to the core, which rejected the -arguments for an unrelated reason. The refusal came from the wrong layer for the wrong reason; had -the tool tolerated non-map arguments, the mirrored-parameter contract would have been satisfied by -a value no client ever mirrored. - -Fix: for `tools/call`, `argument/2` should look only in `params.arguments` and return `nil` -otherwise (which refuses, since a non-empty header can never match `nil`). If the fallback exists -to serve `resources/read`/`prompts/get`, which this package does not implement, say so and gate it -on the method. Either way, pin it with a test. - -### M-4 — `dispatch/3`'s inner rescue is unpinned, and `mutation.md` says why it matters - -`mutation.md`'s closing note argues the inner rescue at `http.ex:506-514` must be kept because it -answers with `message["id"]` while `crash_response/1` answers `id: nil`, and that "removing it would -silently downgrade every dispatch-time crash to an unidentifiable error response." The argument is -correct — and nothing enforces it: - - N11: dispatch/3's inner rescue removed, call site retargeted at do_dispatch/3 - SURVIVED | 101 tests, 0 failures - -The two tests that could have caught it, `test/…/http_test.exs:253` and `:266`, assert `status == -500`, `error.code == -32_603` and `error.message == "Internal error"` — all three identical on both -paths. Neither asserts the `id`. Probe `D5` confirms the id is the only observable difference: - - D5 (dispatch crash, raising dispatch): status=500 - {"error":{"code":-32603,"message":"Internal error"},"id":1,"jsonrpc":"2.0"} - -Fix: one line in the existing test — `assert body!(conn)["id"] == 1`. That is the assertion the -record's own reasoning calls for, and it turns the note into evidence. - -### M-5 — the moduledoc's "What it enforces" table was left behind while the CHANGELOG's copy of it was updated - -`http.ex:50-59` is untouched by this delta (`git diff … | grep -c 'Mcp-Method\` on every request'` -→ **0**), while `CHANGELOG.md` updates the same table in the same diff. The module's own published -documentation now: - -- says ``| `Mcp-Method` on every request | missing or mismatched -> `400`, `-32020` |`` — which is - no longer true (M-1), and the CHANGELOG's copy now reads "(**not** on notifications, which the - revision leaves undefined)"; -- omits `Mcp-Param-{Name}` entirely, a MUST this delta added and enforces; -- omits the encoded-header-value decoding this delta added; -- says ``| unknown method | `404`, `-32601` |`` with no unknown-**tool** row, the distinction this - delta introduced and tested. - -This is the module's `@moduledoc`, so it is what `ex_doc` publishes and what a host reads. Fix: -apply the CHANGELOG's four table edits to `http.ex:50-59`. - -### M-6 — `mutation.md` and `http.ex:320` both misreport the output of the derivation they rest on - -The "how the set was derived" argument is the reason the table is claimed to be complete, so its -command has to say what it is said to say. It does not. - -`mutation.md` states the two-pattern grep "returns exactly three lines: the definition of -`header_values/2`, the one call to it inside `check_origin/2`, and the `mcp-param-` prefix sweep." -Observed: - - $ grep -n 'get_req_header\|req_headers' lib/beam_mcp/transport/http.ex - 320: # The set is derived rather than listed: `grep -n 'get_req_header' …` - 323: defp header_values(conn, name), do: get_req_header(conn, name) - 391: conn.req_headers - -Three lines, but not those three: line 320 is the comment describing the grep, and -`check_origin/2`'s call is absent — it calls `header_values/2`, not `get_req_header`. - -The in-source claim is worse. `http.ex:320-322` says the single-pattern grep "returns only -`header_values/2` and the `mcp-param-` sweep." Observed: - - $ grep -n 'get_req_header' lib/beam_mcp/transport/http.ex - 320: # The set is derived rather than listed: `grep -n 'get_req_header' …` - 323: defp header_values(conn, name), do: get_req_header(conn, name) - -The sweep is not in the output, because it reads `conn.req_headers` directly. The comment names a -command whose output does not contain one of the two things it says the output contains. - -The underlying property — one choke point plus one direct sweep — is true, and I verified the read -sites are exactly four: - - $ grep -n 'header_values(' lib/beam_mcp/transport/http.ex - 224: case header_values(conn, "origin") do - 323: defp header_values(conn, name), do: get_req_header(conn, name) - 406: values = header_values(conn, header_name) - 445: values = header_values(conn, @protocol_header) - -which is also how H-2 becomes visible: line 445's values feed **two** comparisons, and the table -counts one. Fix: state the grep as `get_req_header\|req_headers`, quote its actual three lines, and -enumerate the comparisons rather than the call sites. - ---- - -## LOW - -### L-1 — the `MCP-Protocol-Version` multi-value test does not exercise the branch its name claims - -`test/…/http_test.exs:512-519`, "MCP-Protocol-Version — a second, unsupported version is not -ignored", sends `[{@hdr, @modern}, {@hdr, "1999-01-01"}]` on a body built by `msg/2`, which always -carries `_meta` with the modern version (`http_test.exs:78`). So `body_version` is non-nil and the -request takes `compare_versions/3`'s **first** branch — a `-32020` header/body mismatch — never the -`-32022` unsupported-version branch the name promises. Probe `D1b`: - - D1b (with _meta, dup version): status=400 - {"error":{"code":-32020,"message":"Header mismatch: mcp-protocol-version header does not - match the body value"},...} - -The assertion is `conn.status == 400`, which both branches return, so the test cannot tell them -apart. It still kills mutant 2, so it is not worthless — but it is named for a behaviour it does -not reach, and that mis-naming is what hides H-2. Fix: assert the code (`-32_020`) and rename, or -drop the `_meta` from the body so it really does exercise the unsupported branch (which is the H-2 -test). - -### L-2 — "a malformed Base64 sentinel is compared literally" pins the "not crashed on" half only - -`test/…/http_test.exs:397-405` asserts `status == 400`. The literal-passthrough returns at -`http.ex:336` and `:340` are free to return anything that fails the comparison: - - N5: both `"=?base64?" <> rest` fallbacks -> `""` - SURVIVED | 101 tests, 0 failures - -Literal passthrough is the observable behaviour and it does matter — probe `D6`, a tool literally -named `=?base64?!!!not-base64!!!?=`, reaches dispatch and gets `Unknown tool: -=?base64?!!!not-base64!!!?=` (200, `-32601`), i.e. the header did match the body. Fix: a test where -a tool's *name* is a malformed sentinel and the matching header is accepted, which is what -"compared literally" means. - -### L-3 — `mutation.md`'s list of mutants needing a companion deletion is incomplete - -The record names mutants 9 and 10. Mutant 7 needs one too (`argument/2`); see **7a** above. Fix: add -the sentence to the mutant 7 row, so the "a compiler kill is not a test kill" discipline reads as -the rule it is rather than as two special cases. - -### L-4 — the `-32022` payload reports the first value as `requested` even when a later one is the offender - -`http.ex:485`: `"data" => %{"supported" => [@modern_version], "requested" => List.first(values)}`. -With duplicate headers the refused value need not be the first. Probe `D1` produces a -self-contradictory diagnostic: - - "message":"Unsupported protocol version", - "data":{"requested":"2026-07-28","supported":["2026-07-28"]} - -The client is told the version it requested is unsupported and then handed that same version as the -supported one. The spec's recovery for `-32022` is "pick from `supported` and retry", so a -conforming client retries the identical request forever. Fix: report the offending value — -`Enum.find(values, &(&1 != @modern_version))` — or all of them. - ---- - -## Re-run and found consistent (coverage, not just discrepancies) - -Everything below I measured and it behaved as the code and the record claim. - -- **13/13 recorded mutants**, counts and killing test names, as tabulated above. -- The compiler-kill caution for mutants 9 and 10 (`9a`, `10a` both fail to compile). -- Mutant 10's honest caveat: it kills exactly one test, and the latin-1 `Mcp-Name` test - (`http_test.exs:766`) is *not* among them — the record's admission is accurate. -- Mutant 13's equivalence argument, traced through both call sites; plus `13a` showing the clause's - totality is pinned even though its return value is not. -- `Keyword.drop(opts, @plug_opts)` at `http.ex:155` — the comment claims a `Keyword.take` list once - silently dropped `tools_ttl_ms`/`tools_cache_scope` and a test caught it. Verified: - `N7b` (`Keyword.take(opts, [:tool_catalog, :dispatch])`, `@plug_opts` removed) → **KILLED 1/101** - by `the host chooses the cacheable values, and the default is not permissive`. The claim is true - and the regression is still pinned. -- `init/1`'s behaviour-not-truthiness check is pinned: `N8` (`unless catalog do`) → **KILLED 1/101** - by the new `:tool_catalog` test. All four bad values in that test are discriminating. -- `compare_versions/3`'s branch **ordering** is pinned: `N4` (the two `cond` branches swapped) → - **KILLED 1/101** by `a header disagreeing with the body's _meta is a HeaderMismatch`. Body/header - mismatch correctly takes precedence over version support. -- `check_named/4`'s missing-header branch: `N12` (missing header accepted) → **KILLED 2/101**. -- `check_param_headers/3`'s halt-on-mismatch: `N13` → **KILLED 3/101**. -- `check_origin/2`'s "an absent Origin is not an invalid one": `N14` → **KILLED 1/101**. -- `check_name_header/3`: `N15` (clause deleted) → **KILLED 7/101**, the widest blast radius in the - module. -- `Enum.uniq()` at `http.ex:394`: `N10` (removed) → SURVIVED, and it is genuinely equivalent — - `check_named/4` reads all values for a name, so a repeated name only repeats an identical check. - No action; noted so it is not re-found as a gap. -- **`tools/probe_optional_deps.sh` is a real gate.** Unmodified in the copy: `pass: consumer - compiles without plug; Server present, Transport.HTTP absent`, exit 0. Two independent breakages, - two reds: - - guard removed (`if Code.ensure_loaded?(Plug) do` wrapper deleted, matching `end` dropped) → - `FAIL: a consumer without plug cannot compile beam_mcp (exit 1)`, with `error: module Plug.Conn - is not loaded and could not be found … lib/beam_mcp/transport/http.ex:81`, exit 1. - - `optional: true` removed from `{:plug, "~> 1.16"}` in `mix.exs` → `FAIL: plug was fetched into a - consumer that never asked for it -- it is not optional`, exit 1. - - The artefact assertions (Server present / Transport.HTTP absent) are unreachable given those - two guards fire first, which is fine — they are the belt to that braces. Note H-1: the probe - builds a bare consumer, not one that *plugs* the transport at compile time, which is why it did - not catch H-1. -- Full gate in the copy at the reviewed tree: `format pass, compile pass, test pass, credo pass, - optional deps pass, reuse pass (23 commentable files), licence files pass — Gate OK.` -- Copy verified byte-identical to the worktree after the run; the worktree index never moved - (`git write-tree` still `ebaaed0d918fed52e20af9031a1a8a71158bd3c9`). - -## Summary of required changes - -| id | severity | change | -|---|---|---| -| H-1 | HIGH | `Code.ensure_loaded?(catalog)` → `match?({:module, _}, Code.ensure_compiled(catalog))` at `http.ex:142`; extend the optional-deps probe to plug the transport at compile time | -| H-2 | HIGH | test duplicate `MCP-Protocol-Version` on a body with no `_meta`, asserting `-32022`; add the mutant; stop claiming one mutant per header read until the second comparison on that header is pinned | -| M-1 | MEDIUM | test the notification exemption (positive case) and the id-less-`tools/call` coupling to `server.ex:242`; consider keying the exemption on the method rather than on `id` | -| M-2 | MEDIUM | test two distinct `mcp-param-*` headers, second disagreeing; add the mutant | -| M-3 | MEDIUM | make `argument/2` look only in `params.arguments` for `tools/call`, or gate the fallback on method; pin it | -| M-4 | MEDIUM | `assert body!(conn)["id"] == 1` in the dispatch-crash test | -| M-5 | MEDIUM | apply the CHANGELOG's table edits to the `@moduledoc` table at `http.ex:50-59` | -| M-6 | MEDIUM | correct the derivation claim in `mutation.md` and at `http.ex:320-322` | -| L-1 | LOW | assert the error code in the `MCP-Protocol-Version` multi-value test, or rename it | -| L-2 | LOW | pin literal passthrough with a tool named like a malformed sentinel | -| L-3 | LOW | record that mutant 7 also needed a companion deletion | -| L-4 | LOW | report the offending version in the `-32022` `data.requested` field | diff --git a/slices/002-streamable-http/logs/round3.r1.tree b/slices/002-streamable-http/logs/round3.r1.tree deleted file mode 100644 index 797e1dd1..00000000 --- a/slices/002-streamable-http/logs/round3.r1.tree +++ /dev/null @@ -1 +0,0 @@ -ebaaed0d918fed52e20af9031a1a8a71158bd3c9 diff --git a/slices/002-streamable-http/logs/round3.r2.md b/slices/002-streamable-http/logs/round3.r2.md deleted file mode 100644 index 74830ef4..00000000 --- a/slices/002-streamable-http/logs/round3.r2.md +++ /dev/null @@ -1,388 +0,0 @@ -# Round 3 — lane r2 (resilience and documentation truth) - -Tree read: `ebaaed0d918fed52e20af9031a1a8a71158bd3c9` (matches the brief; written to `logs/round3.r2.tree`). -Scope: `git diff a5cfb67b8a8854714cde36522292c9fc57e96d6a HEAD` — 13 files, 1845 insertions. - -VERDICT: changes required - -All probes ran in a copy at -`/tmp/claude-1000/-home-aylac-Projects-hacktui-hermes/775c8d71-6ac1-4653-8798-382001e76089/scratchpad/lane-r2` -(`cp -a` of the worktree, `.git` and `_build` removed, `MIX_ENV=dev mix compile`). The round-2 -baseline comparison ran in a second copy at `.../scratchpad/lane-r2-round2` -(`git archive a5cfb67 | tar -x`, deps copied in). Every request below went over a real -`:gen_tcp` socket against a live `Bandit.start_link/1` on `127.0.0.1`, port 0 — no `Plug.Test`. -Probe scripts are in `.../scratchpad/probes/`. Nothing in -`/home/aylac/Projects/beam_mcp-wt/002-http` was modified except this file and -`logs/round3.r2.tree`. - -Machine: 125 GiB RAM, ephemeral port range 32768–60999 (28,231 ports). Concurrency probes were -capped at **4,000** simultaneous in-flight at-cap requests and **12,000** held connections, -both well under port exhaustion. The 8,000-concurrent figure was reached by linear -extrapolation from five points, not measured directly; that is stated where it is used. - ---- - -## Half 1 — the round-2 fixes hold. The delta reopened something else. - -### The round-2 defects are closed. Measured, over sockets, at both body sizes. - -`probes/p1_keepalive.exs`, 18 early-return paths × {16 KiB, 200 KiB} body. Every one returned a -bodied response, and a second request on the **same socket** was framed correctly every time. - -``` -########## BODY SIZE 16384 ########## -origin-refused-403 r1=403 (18ms) body1=82 close=false keepalive_r2=200 (7ms) -authorize-refused-403 r1=403 (0ms) body1=73 close=false keepalive_r2=403 (0ms) -authorize-badreturn-403 r1=403 (0ms) body1=73 close=false keepalive_r2=403 (0ms) -authorize-raise r1=500 (2ms) body1=78 close=false keepalive_r2=500 (0ms) -authorize-throw r1=500 (0ms) body1=78 close=false keepalive_r2=500 (0ms) -authorize-exit r1=500 (0ms) body1=78 close=false keepalive_r2=500 (0ms) -missing-protocol-hdr r1=400 (0ms) body1=143 close=false keepalive_r2=200 (0ms) -version-mismatch r1=400 (0ms) body1=150 close=false keepalive_r2=200 (0ms) -method-hdr-mismatch r1=400 (0ms) body1=147 close=false keepalive_r2=200 (1ms) -name-hdr-mismatch r1=400 (0ms) body1=145 close=false keepalive_r2=200 (0ms) -dup-origin-good-then-bad r1=403 (0ms) body1=82 close=false keepalive_r2=200 (0ms) -non-map-params r1=400 (0ms) body1=145 close=false keepalive_r2=200 (0ms) -non-map-meta r1=400 (1ms) body1=118 close=false keepalive_r2=200 (0ms) -map-body-value-in-msg r1=400 (0ms) body1=145 close=false keepalive_r2=200 (0ms) -list-body-value-in-msg r1=400 (0ms) body1=145 close=false keepalive_r2=200 (0ms) -mcp-name-invalid-utf8 r1=400 (0ms) body1=145 close=false keepalive_r2=200 (0ms) -parse-error-badjson r1=400 (0ms) body1=99 close=false keepalive_r2=200 (0ms) -unknown-method-404 r1=404 (0ms) body1=88 close=false keepalive_r2=200 (0ms) -``` -(The 200 KiB block is identical in status, body size and keep-alive outcome for all 18.) - -Specifically: - -* `Mcp-Name: \xFF\xFE`, which round 2 measured as **no response at all**, is now `400` with a - 145-byte JSON-RPC body. Closed. -* `authorize/1` raising, throwing and exiting — round 2's bare empty `500` — is now `500` with a - 78-byte `-32603` body. Closed. -* A non-map `"params"`, and a map or list body value that would have been interpolated into a - refusal message, are now `400` with a real body. Closed. -* Keep-alive survives every path at 200 KiB, including the pre-`read_body` refusals - (`origin`, `check_method`, `authorize`) where the conn still carries an unread 200 KiB body. - The round-1 size-dependent misframing does not reproduce. - -The cap boundary is exact (`probes/p4b.exs`): body `1_048_576` → `200`; body `1_048_577` → `413` -with `connection: close`. `2_000_000` → `413`. - -### HIGH-1 — the widened rescue swallows Bandit's protocol statuses. `408` and `400` become `500`. - -`lib/beam_mcp/transport/http.ex:160-170` - -The delta moved the `rescue`/`catch` from wrapping `do_dispatch/3` to wrapping the whole of -`handle/2` (diff hunk at `+50..+57`). `Plug.Conn.read_body/2` is now inside it. Bandit signals -protocol-level failures by **raising `Bandit.HTTPError` with a `plug_status`** — see -`deps/bandit/lib/bandit/http_error.ex:5` (`defexception message: nil, plug_status: :bad_request`) -and `deps/bandit/lib/bandit/http1/socket.ex` `handle_timeout_with_disconnect_check!/1` -(`request_error!("Read timeout", :request_timeout)`). The transport's `rescue exception ->` now -catches those and answers `crash_response(conn)` = **`500`**. - -Observed vs expected, same probe against both trees (`probes/p6_regress.exs`, `p8_cmp.exs`): - -| input | round-2 tree `a5cfb67` | HEAD `ebaaed0` | expected | -|---|---|---|---| -| stalled body, `Content-Length: 16384` | `408` at 15.0 s, empty body | **`500`** at 15.0 s, `-32603` body | `408` | -| drip 1 B / 3 s, declared 16 KiB | (n/a) | **`500`** at 15.0 s | `408` | -| drip 1 B / 3 s, declared 1 MiB | (n/a) | **`500`** at 15.0 s | `408` | -| `Transfer-Encoding: gzip` | `400` | **`500`** | `400` | -| chunked, malformed chunk size | `400` | **`500`** | `400` | - -``` -===== ROUND-2 TREE (a5cfb67) ===== -DRIP/STALL 16KiB declared -> status=408 at 15.0s body="" -===== HEAD TREE (ebaaed0) ===== -DRIP/STALL 16KiB declared -> status=500 at 15.0s body="{\"error\":{\"code\":-32603,\"message\":\"Internal error\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - -=== ROUND-2 (a5cfb67) === === HEAD (ebaaed0) === -Transfer-Encoding: gzip 400 Transfer-Encoding: gzip 500 -malformed chunk size 400 malformed chunk size 500 -``` - -Why this matters beyond the status code: - -1. **It falsifies the delta's own documentation.** `README.md:156` and `CHANGELOG.md:95` both - claim `408`. Measured at HEAD: `500`. See DOC-1. -2. **It is a semantic loss.** `408` tells a client to retry; `500` tells it the server is broken. - `400` tells a client its framing is wrong; `500` does not. -3. **It is an unauthenticated log-and-alert amplifier.** Every dripped connection now emits an - `[error]`-level stacktrace naming Bandit internals, and a 5xx that any 5xx-rate monitor will - alarm on. One stalled connection, no authentication required: - -``` -13:29:19.127 [error] ** (Bandit.HTTPError) Read timeout - (bandit 1.12.5) lib/bandit/http1/socket.ex:619: ...request_error!/2 - (plug 1.20.3) lib/plug/conn.ex:1184: Plug.Conn.read_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.read_body_bounded/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:188: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:161: BeamMCP.Transport.HTTP.call/2 -``` - -The moduledoc comment at `http.ex:172-183` argues the wide rescue "fixes the class, including -whatever nobody has thought of yet". That argument is sound for *host* and *decode* crashes. It -did not account for the fact that the transport's own framing layer uses exceptions as its -status-signalling channel. The fix is to re-raise rather than flatten: match -`Bandit.HTTPError`/`Plug.Exception`-implementing exceptions (or check -`Plug.Exception.status/1 != 500`) and re-raise them so Bandit maps them, and keep -`crash_response/1` for everything else. Both `rescue` sites need it — the one at `162` and the -one at `506`. - -### Header handling: bounded, but by Bandit, not by this package. - -`check_param_headers/3` (`http.ex:390-403`) iterates `conn.req_headers`. The brief's three -questions, measured (`probes/p2_headers.exs`, `p3_raw.exs`): - -| input | result | who bounded it | -|---|---|---| -| 40 `Mcp-Param-*` headers | `400`, 149-byte body | reached the Plug | -| 49 / 60 / 200 / 10,000 `Mcp-Param-*` headers | `HTTP/1.0 431 Request Header Fields Too Large` | Bandit, `max_header_count` default **50** (`deps/bandit/lib/bandit/http1/socket.ex:151`) | -| `mcp-param-` + 5,000 B suffix | `400`, **5,147**-byte body | reached the Plug | -| `mcp-param-` + 9,900 B suffix | `400`, **10,047**-byte body | reached the Plug | -| `mcp-param-` + 100,000 B suffix | `431` | Bandit, `max_header_length` default **10,000** (`socket.ex:150`) | -| `Mcp-Name: =?base64?<9,500 B>?=` | `400`, 145-byte body | reached the Plug | -| `Mcp-Name: =?base64?<10 MB>?=` | `431` | Bandit, `max_header_length` | -| header name with `\xFF\xFE` | `HTTP/1.0 400 Bad Request` | Bandit's header parser | - -So: **no unbounded work, no crash, no hang, and the bound comes entirely from Bandit's HTTP/1 -defaults, not from this package.** `Base.decode64` is fed at most 10,000 bytes. -`Enum.uniq |> Enum.reduce_while` runs over at most 50 names. That is the right answer, but it is -an inherited one — see DOC-5. - -### LOW-2 — the attacker-controlled header *name* is reflected verbatim into the refusal body. - -`lib/beam_mcp/transport/http.ex:411` and `:418-421` - -`check_named/4` interpolates `header_name` into the `-32020` message, and for `mcp-param-*` that -name comes straight from `conn.req_headers`. A 9,910-byte header name produced a 10,047-byte -response body: - -``` -mcp-param name 9900B (max-ish) - HTTP/1.1 400 Bad Request ... content-length: 10047 ... - {"error":{"code":-32020,"message":"Header mismatch: mcp-param-aaaaaaaa… -``` - -Observed: attacker-chosen bytes echoed to the caller. Expected: either a fixed message, or the -name truncated. It is **not** an amplification vector — ratio is ~1:1 and Bandit caps the input -at 10,000 bytes — and the value is JSON-encoded so there is no injection. But it is the same -shape as the defect the delta fixed three functions away (`http.ex:425-428`: body values must not -be interpolated); header *names* were not brought into that rule, and the mitigation is a -dependency default rather than anything this module does. Recommend truncating the name in the -message, or dropping it in favour of a count. - -### LOW-1 — `decode_header_value/1` is applied wider than the MUST it cites, and inconsistently. - -`lib/beam_mcp/transport/http.ex:325-348`, `:466-492` - -The code's own quoted MUST (`:325-326`) scopes decoding to "an encoded `Mcp-Name` or -`Mcp-Param-{Name}` value". `CHANGELOG.md` documents it the same way: "`=?base64?…?=` on -`Mcp-Name` / `Mcp-Param-{Name}`". But decoding lives in `all_match?/2`, which every header read -goes through. Measured (`probes/p12_impl.exs`): - -| header, base64-encoded | result | documented? | -|---|---|---| -| `Mcp-Name: =?base64?ZWNobw==?=` | `200`, dispatched | yes | -| `Mcp-Param-region: =?base64?ZXUtd2VzdDE=?=` | `200`, dispatched | yes | -| `Mcp-Method: =?base64?dG9vbHMvY2FsbA==?=` | **`200`, dispatched** | **no** | -| `MCP-Protocol-Version: =?base64?MjAyNi0wNy0yOA==?=` | **`400` `-32022`**, `"requested":"=?base64?MjAyNi0wNy0yOA==?="` | **no** | - -Two separate issues. First, `Mcp-Method` is decoded although the spec's decode MUST does not -name it: a load balancer routing on the raw `=?base64?dG9vbHMvY2FsbA==?=` and a server executing -the decoded `tools/call` is precisely the header/body divergence the MUST was scoped to bound, -and this widens that surface by one header without saying so. Second, `compare_versions/3` is -internally inconsistent — the body-match branch (`:473`, via `all_match?`) decodes, and the -supported-version branch (`:477`, `&(&1 == @modern_version)`) compares raw. The outcome today is -a refusal, which is safe; it is a trap for whoever next adds a version to the supported set. -The CONVENTIONS.md rule the delta adds ("every place a mechanism reads the same kind of input is -one mechanism") produced the single read path correctly, and then applied its *transformation* -to two headers the derivation never argued for. - ---- - -## Half 2 — the documented numbers - -Every number in the new README/CHANGELOG paragraphs is transcribed from -`logs/round2.r2.md:172-350`, which measured the **round-2 tree**. The same delta then changed the -behaviour behind two of them. That is the failure mode CONVENTIONS.md's own new section names — -a record written once and not re-derived after the tree moved under it. - -### Claim table - -| # | claim | file:line | measured at `ebaaed0` | verdict | -|---|---|---|---|---| -| 1 | `authorize/1` reading a 119-byte body → `200` | README:156, CHANGELOG:95 | `200` (my minimal body was 151 B; small body succeeds) | **holds** (kind) | -| 2 | 16 KiB body read in `authorize/1` → `408` at 15.0 s | README:156, CHANGELOG:95 | **`500`** at 15.0 s | **FALSE** | -| 3 | 200 KiB body read in `authorize/1` → `408` at 15.0 s | README:156, CHANGELOG:95 | **`500`** at 15.0 s | **FALSE** | -| 4 | connection dead afterwards | README:155, CHANGELOG:94 | follow-up on same socket → `:error` | **holds** | -| 5 | ~1.05 MiB per in-flight request at the cap | README:166 | 1,047 KiB (1.023 MiB) BEAM total; 1,094–1,228 KiB RSS | **holds** | -| 6 | linear, no plateau | README:166-167 | 256.4 / 511.4 / 1023.1 / 2044.4 / 4090.4 MiB at N = 250/500/1000/2000/4000 — linear to 4 significant figures | **holds** | -| 7 | to 8,000 concurrent, +8.16 GiB RSS | README:167 | not measured (capped at 4,000); RSS delta 4,274.7 MiB at 4,000 → 8.35 GiB extrapolated | **corroborated, not reproduced** | -| 8 | ceiling `num_acceptors * num_connections` | README:168 | `acceptor_supervisor.ex:51` sets `max_children: config.num_connections` per acceptor | **holds** | -| 9 | defaults 100 × 16,384 = 1,638,400 | README:169 | `num_acceptors` = **100** counted live at runtime; `num_connections` default **16_384** (`thousand_island.ex:122,137`). 100 × 16,384 = 1,638,400 | **holds** | -| 10 | `@max_body_bytes` is a floor, not a ceiling | README:170-172 | 1,064,960–1,568,768 bytes written before the `413`, vs a 1,048,576 cap | **holds (shape)** | -| 11 | 1,769,325 bytes read before refusing a declared 32 MiB body | README:172 | not reproduced in 20 trials; range 1,064,960–1,568,768 | **FALSE as stated** | -| 12 | read timeout is 15,000 ms | README:174 | 15.0 s measured on every timeout path | **holds** | -| 13 | it is Bandit's and inherited | README:173-174 | `Keyword.get(opts, :read_timeout, 15_000)` at `deps/bandit/lib/bandit/http1/socket.ex:251,302,333`; `read_body_bounded/1` passes only `length:` (`http.ex:268`) | **holds** | -| 14 | whole-body deadline, not a per-read reset | README:175 | drip 1 B/3 s answered at 15.0 s for both a 16 KiB and a 1 MiB declared body | **holds in practice** (see note) | -| 15 | drip client answered `408` at 15 s | README:175-176 | **`500`** at 15.0 s | **FALSE** | -| 16 | 16,500 held connections = 243 MiB | README:176 | 12,000 opened → +50.8 MiB BEAM total / +79.5 MiB RSS, but connections die at the 15 s deadline so the count is not a steady state | **not reproducible as stated** | -| 17 | a legitimate request still served in 0.00 s | README:176-177 | `200` in 0.01 s / 0.0 s / 0.0 s at 2,000 / 6,000 / 12,000 held | **holds** | -| 18 | `405` on non-POST | README:213 | `405` + `Allow: POST` for GET and DELETE | **holds** | -| 19 | `404` for an unimplemented method | README:213 | `404`, `-32601`, `"Method not found: zz/zz"` | **holds** | -| 20 | `200` + JSON-RPC error for an unknown tool | README:213 | `200`, `-32601`, `"Unknown tool: nosuch"` | **holds** | -| 21 | every header checked in all values | README:213-215 | good-then-bad `Origin` → `403`; five duplicate-header tests in the delta | **holds** | -| 22 | sessions / `Mcp-Session-Id` not implemented | README:215-216 | `Mcp-Session-Id: abc` ignored, no session state | **holds** | -| 23 | `initialize` not implemented | README:216-217 | **`200`** with a full initialize result | **FALSE** | - -Note on 14: the claim is true at the sizes this package uses, but for the reason the README does -not give. `read_exactly!/5` (`socket.ex:400-425`) passes `read_timeout` to *each* `recv`, so the -mechanism is per-read. It behaves as a whole-body deadline only because `:gen_tcp.recv/3` with an -explicit length is an absolute deadline for that call and `read_length` defaults to 1,000,000 — -so a body at the 1,048,576 cap needs at most two reads. Measured at both 16 KiB and 1 MiB: 15.0 s. -The claim holds; the stated reason does not, and it would stop holding if `@max_body_bytes` were -raised much above 1 MiB. - -### HIGH-2 — README:216-217 says `initialize` is not implemented. It is, and it answers with the wrong revision. - -`README.md:215-217` vs `lib/beam_mcp/server.ex:118-130` and `lib/beam_mcp/transport/http.ex:516-521` - -``` -$ POST /mcp {"method":"initialize", "_meta":{"…/protocolVersion":"2026-07-28"}, …} -HTTP initialize -> 200 -{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":false}}, - "protocolVersion":"2025-11-25","serverInfo":{"name":"beam_mcp","version":"0.3.0"}}} -``` - -Observed: `200` with a legacy-revision handshake result. Expected per README:216: not -implemented — and per the transport's stated contract, `404` (it is a method this revision does -not have), or at minimum not a `2025-11-25` negotiation from an endpoint whose moduledoc -(`http.ex:13`) says it serves `2026-07-28` and nothing else. - -This is not a subtle inference. **The README contradicts itself 31 lines later**, at -`README.md:247`: "`initialize` are matched *before* the revision switch, so neither is affected -by what a `_meta` says." That sentence is correct and is exactly why the transport cannot exclude -it: `do_dispatch/3` (`http.ex:520-521`) stamps `_meta` with `2026-07-28` and then hands the -message to `Server.handle_message/2`, whose `initialize` clause (`server.ex:119`) matches ahead -of the era switch. The code comment at `http.ex:517-519` — "the core decides era from the -message, and the transport guarantees the message says so" — is therefore false for exactly one -method, and that method is the one the README lists as absent. - -Mitigating: `Server.new(opts.server_opts)` is called fresh per request (`http.ex:523`), so the -`initialized?: true` transition does not survive the response and there is no cross-request state. -The defect is the false documentation plus a caller being handed a revision the endpoint does not -speak. - -### DOC-1 — the two `408` claims (severity: HIGH, folded into HIGH-1) - -`README.md:156`, `CHANGELOG.md:95`. Both state `408`; both measure `500` at HEAD. Both are -verbatim from `logs/round2.r2.md:172-173`, taken against `a5cfb67` where `408` was correct. The -correct remedy is to fix the code (HIGH-1) rather than the sentence — `408` is the right answer. - -### MEDIUM-1 — `1,769,325` is a single-run artifact of the measuring client, stated as a property. - -`README.md:172` - -`round2.r2.md:304` says "**up to** 1,769,325 bytes". README:172 states it as "a declared 32 MiB -body **had** 1,769,325 bytes read", turning the maximum of a run into a point measurement of the -package. 20 trials at four different client `sndbuf` settings (`probes/p4c.exs`): - -``` -sndbuf 16 KiB [1286144, 1150976, 1085440, 1064960, 1155072] min=1064960 max=1286144 -default sndbuf [1114112, 1208320, 1196032, 1114112, 1101824] min=1101824 max=1208320 -sndbuf 1 MiB [1224704, 1212416, 1118208, 1224704, 1196032] min=1118208 max=1224704 -sndbuf 4 MiB [1568768, 1130496, 1212416, 1171456, 1191936] min=1130496 max=1568768 -default client socket opts: [sndbuf: 2626560, recbuf: 131072, buffer: 9216] -``` - -Observed: 1,064,960–1,568,768, spread with the client's socket buffers, never 1,769,325. Expected: -a number a reader can reproduce. What the *server* reads is `min(content_length, 1_048_576)` — -exactly the cap (`do_read_content_length_data!`, `socket.ex:248`) — plus whatever header-parse -read left buffered. The excess a client observes is kernel socket buffering on both ends and is -machine-specific. The claim's shape ("a floor, not a ceiling") is correct and worth keeping; -the digits should become a range, or "somewhat more than the cap, depending on socket buffers". - -### MEDIUM-2 — not one of the ten new numeric claims is pinned. - -`test/beam_mcp/readme_claims_test.exs` is **untouched** by the delta -(`git diff --stat a5cfb67..HEAD -- test/beam_mcp/readme_claims_test.exs` is empty), and: - -``` -$ grep -rn "408\|read_timeout\|1_769_325\|1769325\|1_638_400\|1638400\|1\.05 MiB\|8000 concurrent\|16,500\|16500" test/ -(no matches) -``` - -The delta's 26 new tests in `http_test.exs` cover the header-validation and rescue behaviour well -— five duplicate-header tests, three `Mcp-Param` tests, three base64 tests, the 404/200 split, the -non-string body values, and the raise/throw/exit rescue. None of them touch a number in the -README. That file's own moduledoc already flags the gap ("Nothing enumerates the README's claims -and proves each has a test"); the delta added ten more claims to the unpinned side and, in three -cases, the unpinned number is now wrong. The three that are wrong are precisely the ones a test -would have caught: `408` is a two-line socket test, and `initialize` is a one-line one. - -### LOW-3 — the resource section omits the bound that is actually doing the work on headers. - -`README.md:164-177` enumerates what the Plug does and does not bound: body size, aggregate memory, -bytes read, time. It does not mention headers at all, and headers are the one attacker-controlled -input `check_param_headers/3` iterates. The real bounds are Bandit's `max_header_count: 50` and -`max_header_length: 10_000` (`deps/bandit/lib/bandit/http1/socket.ex:150-151`), demonstrated above -by `431` responses. Given that the section's whole argument is "here is what is yours and what is -your server's", a fourth bullet naming the header bounds as the server's belongs in it. - -### LOW-4 — "16,500 such connections held 243 MiB" describes a transient, not a hold. - -`README.md:176`. Such connections cannot be *held*: each dies at the 15 s deadline the same -sentence describes. Measured at 2,000 / 6,000 / 12,000 opened (`probes/p14_hold.exs`), with -attrition already under way inside the measurement window: - -``` -held=2000 d_total=43.4MiB d_rss=69.8MiB legit_request=200 in 0.01s -held=6000 d_total=52.3MiB d_rss=80.4MiB legit_request=200 in 0.0s -held=12000 d_total=50.8MiB d_rss=79.5MiB legit_request=200 in 0.0s -``` - -The point the sentence is making — the timeout bounds the slow-client cost, and service is -unaffected — is **correct and confirmed** (a legitimate request was served in ≤0.01 s throughout). -Only the framing of 16,500 as a sustained population is wrong, and it is the framing that makes -the 243 MiB figure unreproducible: the denominator is a moving target. - ---- - -## Corrections to my own measurements - -Stated explicitly, per the brief. - -* My first run of `probes/p4_floor.exs` reported `status=` (none) for all three 32 MiB trials. - That was a bug in **my** probe — the polling loop consumed the response into a discarded binding - — not a missing response from the server. Corrected in `p4b.exs`, which shows `413` with - `connection: close` on all five trials. **This correction makes the package look better**, and - I am flagging it as such. -* My first cap-boundary run reported a `1_048_577`-byte body returning `200`. That was also my - bug: my padding arithmetic produced a 1,048,536-byte body, under the cap. Corrected in `p4b.exs` - with exact sizes: `1_048_576` → `200`, `1_048_577` → `413`. **Also makes the package look better.** -* `probes/p14_hold.exs` rebinds a counter inside a comprehension, which does not accumulate in - Elixir; the three rows are 2,000 / 6,000 / 12,000 cumulative opens, not 2,000 / 4,000 / 6,000. - I have labelled them with what actually happened rather than what I intended. This gave me - *more* coverage than planned, so it does not weaken the conclusion, but the per-connection KiB - figures from that probe are unusable (dead connections in the denominator) and I have not - quoted them. -* Claim 7 (8,000 concurrent) is extrapolated from five measured points capped at 4,000, not - measured. I have not marked it "holds". -* Claim 1 (119 bytes) I could not reproduce exactly — my minimal valid message for this catalog - is 151 bytes. I verified the kind (a small body succeeds) rather than the digit. - ---- - -## Summary of findings - -| id | sev | file:line | headline | -|---|---|---|---| -| HIGH-1 | HIGH | `lib/beam_mcp/transport/http.ex:160-170` | The widened rescue swallows `Bandit.HTTPError`; read timeout `408`→`500`, bad transfer-encoding `400`→`500`, malformed chunked `400`→`500`. Regression vs `a5cfb67`, and an unauthenticated 5xx + error-stacktrace amplifier. | -| HIGH-2 | HIGH | `README.md:216-217` | Claims `initialize` is not implemented; it returns `200` with `protocolVersion: "2025-11-25"`. Contradicted by `README.md:247` in the same file. | -| DOC-1 | HIGH | `README.md:156`, `CHANGELOG.md:95` | Both claim `408`; both measure `500`. Fix the code (HIGH-1), not the sentence. | -| MEDIUM-1 | MEDIUM | `README.md:172` | `1,769,325 bytes` is unreproducible (20 trials: 1,064,960–1,568,768) and is a client-socket-buffer artifact stated as a package property. | -| MEDIUM-2 | MEDIUM | `test/beam_mcp/readme_claims_test.exs` | Untouched by the delta; none of the ten new numeric claims is pinned. The three wrong ones are exactly the two-line tests. | -| LOW-1 | LOW | `http.ex:325-348`, `:466-492` | Base64 decoding applied to `Mcp-Method` (outside the quoted MUST, and undocumented) and half-applied to `MCP-Protocol-Version` (`:473` decodes, `:477` does not). | -| LOW-2 | LOW | `http.ex:411`, `:418-421` | Attacker-controlled header *name* reflected verbatim into the refusal body (10,047 B out for 9,910 B in); bounded only by Bandit's `max_header_length`. | -| LOW-3 | LOW | `README.md:164-177` | The resource section omits header bounds, which are Bandit's (`max_header_count: 50`, `max_header_length: 10_000`) and are what actually bounds `check_param_headers/3`. | -| LOW-4 | LOW | `README.md:176` | "16,500 such connections held 243 MiB" is a transient, not a hold — those connections die at the 15 s deadline the same sentence describes. | diff --git a/slices/002-streamable-http/logs/round3.r2.tree b/slices/002-streamable-http/logs/round3.r2.tree deleted file mode 100644 index 797e1dd1..00000000 --- a/slices/002-streamable-http/logs/round3.r2.tree +++ /dev/null @@ -1 +0,0 @@ -ebaaed0d918fed52e20af9031a1a8a71158bd3c9 diff --git a/slices/002-streamable-http/logs/round3.s1.md b/slices/002-streamable-http/logs/round3.s1.md deleted file mode 100644 index 02020c58..00000000 --- a/slices/002-streamable-http/logs/round3.s1.md +++ /dev/null @@ -1,363 +0,0 @@ -# Round 3 — lane s1 (security / specification conformance) - -Tree read: `ebaaed0d918fed52e20af9031a1a8a71158bd3c9` -(`git rev-parse HEAD^{tree}`, matches the value the assignment names.) - -Scope: `git diff a5cfb67b8a8854714cde36522292c9fc57e96d6a HEAD` — 13 files, 1845 insertions. - -VERDICT: changes required - -**Where the probes ran.** Every probe, every mutation and every compile ran in -`/tmp/claude-1000/-home-aylac-Projects-hacktui-hermes/775c8d71-6ac1-4653-8798-382001e76089/scratchpad/lane-s1`, -a `cp -a` of the worktree with `.git` and `_build` removed. Mutations asserted their match count -before and after applying and were restored from a saved original; `diff -q` against the worktree -confirms `lib/beam_mcp/transport/http.ex` and `lib/beam_mcp/server.ex` are byte-identical to the -reviewed tree. The worktree itself was only read, apart from this file and `round3.s1.tree`. - -Baseline in the copy, before any mutation and with probe files removed: -`mix test` → **101 tests, 0 failures**; `mix format --check-formatted` → clean; -`mix credo --strict` → **no issues**. Every finding below is a gap the suite does not cover, not -a red test. - -Spec quotations are from the verbatim archive already in the repo, -`slices/002-streamable-http/logs/spec-streamable-http.md`, cited by line. - ---- - -## F1 — HIGH — the Base64 sentinel is decoded on `Mcp-Method`, which reopens the smuggling this delta exists to close - -**file:line** `lib/beam_mcp/transport/http.ex:346-348` (`all_match?/2` calls `decode_header_value/1` -unconditionally), reached for `mcp-method` via `check_method_header/3` at `:366-370` → `check_named/4` -at `:405-423`. - -The spec scopes the sentinel to two headers. `spec-streamable-http.md:470` — *"Clients **MUST** -encode **parameter values** before including them in HTTP headers"*; `:491` — *"The same encoding -rule applies to the `Mcp-Name` header value"*; `:502-504` — *"servers **MUST** decode an encoded -`Mcp-Name` or `Mcp-Param-{Name}` value before comparing it"*. `Mcp-Method` is not in that set, and -a conforming client would never encode it: method names (`tools/call`) are always header-safe ASCII. -The delta's own CHANGELOG row says the same — *"an encoded header value is decoded before comparison -| `=?base64?…?=` on `Mcp-Name` / `Mcp-Param-{Name}`"* (CHANGELOG.md, delta hunk at the requirements -table). The code applies it to every header that routes through `all_match?/2`. - -**Observed**, over a real Bandit socket on 127.0.0.1:4599, not `Plug.Test`: - -``` -W3 Mcp-Method: =?base64?dG9vbHMvY2FsbA==?= -> HTTP/1.1 200 OK dispatch={:dispatched, :echo, %{}} -``` - -Expected: `400` / `-32020`, the same as any other `Mcp-Method` that is not the body's `method`. - -**Why it is HIGH and not cosmetic.** `spec-streamable-http.md:246-248` states the reason the header -exists: *"so that intermediaries (load balancers, gateways, observability tooling) can route and -inspect requests without parsing the body."* A gateway with a denylist rule on `Mcp-Method: -tools/call` does not match `=?base64?dG9vbHMvY2FsbA==?=`; this server runs `tools/call`. That is -precisely the header/body divergence at `:588-593` (*"a load balancer routing on the header value -while the MCP server executes based on the body value"*) — reintroduced by the decoder's placement, -in the same commit that fixed it for duplicate values. - -No mutant in `logs/mutation.md` pins the *scope* of decoding. Mutant 8 disables the base64 clause -entirely and is killed by the `Mcp-Name` test; nothing fails if decoding is applied too widely. - -**Fix.** Decode only for `mcp-name` and `mcp-param-*`. Either split `all_match?/2` into an -encoded-permitted and a literal variant, or pass the permission as an argument from `check_named/4`. -Add a test asserting an encoded `Mcp-Method` is `400`, and a mutant that widens the scope again. - ---- - -## F2 — HIGH — the `Mcp-Param-{Name}` population is derived from the request, so the spec's "client omits the header" MUST is unenforced, and the README claims otherwise - -**file:line** `lib/beam_mcp/transport/http.ex:390-403`. The comment at `:388-389` states the design -choice openly: *"The population is derived from the request rather than from the schema: every -`mcp-param-*` header present must match the argument of that name."* - -The spec's server-behaviour table is four rows, `spec-streamable-http.md:564-569`: - -| Scenario | Client Behavior | Server Behavior | -|---|---|---| -| Parameter value provided | Client MUST include the header | Server MUST validate header matches body | -| Parameter value is `null` | Client MUST omit the header | Server MUST NOT expect the header | -| Parameter not in arguments | Client MUST omit the header | Server MUST NOT expect the header | -| **Client omits header but value is in body** | **Non-conforming client** | **Server MUST reject the request** | - -Rows 1–3 are implemented. Row 4 is not, and it is the row with a security consequence. - -**Observed**, real socket, catalog tool `:echo` whose `inputSchema` annotates -`"region": {"x-mcp-header": "Region"}`: - -``` -W4 no Mcp-Param-Region -> HTTP/1.1 200 OK dispatch={:dispatched, :echo, %{region: "eu-west1"}} -``` - -Expected: `400` / `-32020`. An attacker (or a hop that strips headers it does not know) simply omits -`Mcp-Param-Region`; the gateway routes on its default and the server executes `eu-west1`. - -**The delta's prose asserts the opposite.** README.md:210 — *"`Mcp-Param-{Name}` is enforced because -`tool_definition/1` passes a schema's `x-mcp-header` annotation through to `tools/list` verbatim."* -The passthrough is real — I confirmed `server.ex:249` emits `"inputSchema" => tool.input_schema` -untouched, and a live `tools/list` returns -`{"properties":{"region":{"type":"string","x-mcp-header":"Zone"},...}}` — but the transport never -reads the annotation back. The enforcement is grounded in something it does not consult. The -README's Implemented list likewise says the three headers are *"required where the revision requires -them"*; `Mcp-Param-{Name}` is never required, only validated when volunteered. - -**Fix.** Either (a) resolve the annotated set from `opts.server_opts[:tool_catalog]`'s `input_schema` -for the named tool and require a header for every annotated property that has a value in -`arguments`; or (b) if that is deferred to a later release, delete the enforcement claim from -README.md:210 and the "required where the revision requires them" sentence, and record row 4 as not -implemented in the same list that already carves out sessions and SSE. What is not acceptable is the -current pairing: the claim shipped, the control did not. - ---- - -## F3 — HIGH — the header suffix is treated as a top-level, case-sensitive argument key, so a conforming client is rejected with no recovery - -**file:line** `lib/beam_mcp/transport/http.ex:396` -(`arg_name = String.replace_prefix(header, "mcp-param-", "")`) and `:441-442` (`argument/2`). - -The spec does not say the name portion is the property key, and does not say the property is -top-level. `spec-streamable-http.md:375` — *"The `x-mcp-header` property specifies the **name -portion** used to construct the header name `Mcp-Param-{name}`"*, constrained only to be a non-empty -HTTP token (`:379-381`). `:389-395` — *"**MUST** only be applied to properties that are statically -reachable ... **Nested object properties are permitted** as long as every step in the chain is a -`properties` key."* `:398-401` — *"Header extraction is defined as reading the instance value at the -**exact property path** of the annotated property."* - -Three shapes a conforming client cannot get past. All measured; all `400` / `-32020`: - -``` -S1 schema: "region": {"x-mcp-header": "Zone"}; client sends Mcp-Param-Zone: eu-west1 - -> 400 {"error":{"code":-32020,"message":"Header mismatch: mcp-param-zone header does not - match the corresponding request body value"}} - -S2 schema: "filter": {"properties": {"tenant": {"x-mcp-header": "Tenant"}}}; - body arguments {"filter":{"tenant":"acme"}}; client sends Mcp-Param-Tenant: acme - -> 400 ... mcp-param-tenant header does not match ... - -C1 schema: "Region": {"x-mcp-header": "Region"}; body {"Region":"eu-west1"}; - client sends Mcp-Param-Region: eu-west1 - -> 400 ... mcp-param-region header does not match ... - -C2 schema: "maxRows": {"x-mcp-header": "MaxRows"}; body {"maxRows":10}; - client sends Mcp-Param-MaxRows: 10 - -> 400 ... mcp-param-maxrows header does not match ... -``` - -C1/C2 are the ones that will actually be hit. `spec-streamable-http.md:598-602` makes header *names* -case-insensitive, so Bandit downcases `Mcp-Param-MaxRows` to `mcp-param-maxrows`; `:396` then strips -the prefix and uses the downcased remainder as a **case-sensitive JSON object key**. `args["maxrows"]` -is `nil`, and every camelCase or capitalised argument key is unreachable over HTTP. The spec's own -examples are capitalised throughout (`Mcp-Param-Region`, `Mcp-Param-Greeting`, `Mcp-Param-Text`, -`Mcp-Param-Val`, `:515-519`). - -This is the same failure shape round 2 recorded for base64 `Mcp-Name` at `round2.r1.md:125-141`: the -recovery the spec advises for a `HeaderMismatch` — re-read `tools/list` and retry (`:541-546`) — -cannot help, because `tools/list` returns the identical annotation. That defect was fixed; this one -is its twin and was not found because the delta's three `x-mcp-header` tests -(`test/beam_mcp/transport/http_test.exs:585-620`) all use `region` for both the property key and the -header suffix — the one naming convention where the bug is invisible. - -**Fix.** Build the mapping from the tool's schema: walk `properties` chains, collect -`{downcase(x-mcp-header value) => property path}`, and resolve the header suffix through that map -rather than assuming suffix == top-level key. This is the same catalog read F2 needs, so the two -fixes share their mechanism. Add tests for a differing name portion, a nested path, and a -camelCase key. - ---- - -## F4 — MEDIUM — non-canonical Base64 is accepted, so several distinct raw header values satisfy one body value - -**file:line** `lib/beam_mcp/transport/http.ex:334-336`. - -`Base.decode64/1` discards non-zero trailing bits rather than rejecting them: - -``` -P5 decode64("ZWNobw==") = {:ok, "echo"} -P5 decode64("ZWNobx==") = {:ok, "echo"} -``` - -so four different header values all pass the `Mcp-Name: echo` comparison. Over a real socket: - -``` -W5 Mcp-Name==?base64?ZWNobw==?= -> HTTP/1.1 200 OK dispatch={:dispatched, :echo, %{}} -W5 Mcp-Name==?base64?ZWNobz==?= -> HTTP/1.1 200 OK dispatch={:dispatched, :echo, %{}} -``` - -(In-process, `ZWNobx==` and `ZWNoby==` behave identically: `P5 ... -> 200`.) - -An intermediary that compares the header bytes against the canonical encoding it would have -produced, or that uses a strict decoder, sees a value this server does not. That is the same -divergence primitive as F1, one layer down. It is MEDIUM rather than HIGH because exploiting it -needs an intermediary that decodes or canonicalises, which is a narrower population than one that -string-matches. - -**Fix.** After decoding, require canonicality: `Base.encode64(decoded) == encoded`, otherwise fall -through to the literal comparison (or refuse). One line, and it makes the encoding a bijection. - ---- - -## F5 — MEDIUM — `argument/2` falls back to `params`, so `Mcp-Param-{Name}` can be satisfied by a value that is not an argument - -**file:line** `lib/beam_mcp/transport/http.ex:441-442`: - -```elixir -defp argument(%{"params" => %{"arguments" => %{} = args}}, key), do: args[key] -defp argument(message, key), do: param(message, key) -``` - -When `params.arguments` is absent or is not a map, the second clause compares `Mcp-Param-X` against -`params["X"]` — a field of the RPC envelope, not a tool argument. - -**Observed** (in-process; the body has no `arguments` key at all): - -``` -P8 body params {"name":"echo"}; headers mcp-name: echo, mcp-param-name: echo - -> 200, dispatched {:dispatched, :echo, %{}} -P8b body params {"name":"echo","arguments":"not-a-map"}; same headers - -> 200 -``` - -The request is accepted while asserting, in a header an intermediary is invited to read, that -argument `name` has the value `echo`. The dispatched arguments are `%{}` — the tool never receives a -`name` argument. Expected per `spec-streamable-http.md:566-567` (*"Parameter not in arguments | -Client MUST omit the header | Server MUST NOT expect the header"*, and the header was sent anyway, -making the client non-conforming): `400` / `-32020`. - -**Fix.** `argument/2` should return `nil` when `params.arguments` is not a map, rather than falling -through to `param/2`. The `param/2` fallback is right for `Mcp-Name` (which genuinely reads -`params.name`) and wrong for `Mcp-Param-*`. - ---- - -## F6 — LOW — integer values are compared as strings, against an explicit SHOULD - -**file:line** `lib/beam_mcp/transport/http.ex:429-433` (`to_comparable/1`). - -`spec-streamable-http.md:583-586`: *"When validating integer parameter values, servers **SHOULD** -compare the header value and the body value numerically rather than as strings (e.g., `42.0` and -`42` are considered equal)."* - -**Observed:** - -``` -P3 body n=42 header=42 -> 200 -P3 body n=42 header=42.0 -> 400 -P3 body n=42.0 header=42 -> 400 -P3 body n=42.0 header=42.0 -> 200 -``` - -Fails closed, so it is interop rather than security, and `x-mcp-header` forbids the `number` type -(`:385-386`), which narrows it further. But the README's "Implemented" list does not carve it out, -and the CHANGELOG table does not mention it. Either implement the numeric compare or name it in the -"not implemented" list. - ---- - -## F7 — LOW — the attacker's header name is reflected verbatim into the refusal body - -**file:line** `lib/beam_mcp/transport/http.ex:417-421`. - -``` -P6 status 400 body={"error":{"code":-32020,"message":"Header mismatch: - mcp-param-x\"> header does not match the corresponding - request body value"},"id":1,"jsonrpc":"2.0"} -P6 resp content-type=["application/json; charset=utf-8"] -``` - -The delta's own test at `test/beam_mcp/transport/http_test.exs:731-737` argues the case for the body -*value* — *"the value is also attacker-chosen text being reflected to an unauthenticated caller, so -the message names the header and says nothing about what was in it"* — and then names the header, -which for `mcp-param-*` is equally attacker-chosen. Content-type is `application/json`, and a -conforming HTTP adapter rejects a field name that is not a token, so the reachable surface is -narrow (a Plug feeding this one, per the `Plug.Router` mount the delta's README now documents). -Reflecting the caller's own input back to the caller is not a disclosure of host state, hence LOW. -Fix: use a fixed label, or the fact that a mismatch occurred without naming which header. - ---- - -## F8 — LOW — the new README paragraphs are asserted, not pinned, and one of them is false - -`test/beam_mcp/readme_claims_test.exs` is **not** in the delta (`git diff --stat` lists only -`test/beam_mcp/transport/http_test.exs` under `test/`). Its own moduledoc already says the mechanism -*"does not catch a claim added without a test"*, so this is a disclosed gap rather than a false -guarantee — I am not scoring the gap itself. - -What I am scoring is what went through it. The delta adds prose carrying precise measurements — -`119 bytes 200`, `16 KiB and 200 KiB both 408 after 15.0 s`, `1,769,325 bytes read before the 413`, -`8,000 concurrent (+8.16 GiB RSS)`, `100 × 16,384 = 1,638,400`, `16,500 connections held 243 MiB` — -and one behavioural claim, README.md:210, which F2 measures to be false. A false claim is exactly -the class `readme_claims_test.exs` exists for, and it entered in the release where nothing was added -to the list. At minimum: correct README.md:210 per F2, and add it to the pinned list so the -correction cannot silently regress. - ---- - -## What I tried that did NOT find anything - -Reported so the lane is measurable rather than a list of hits. - -- **The derived-set claim holds.** `grep -n 'get_req_header\|req_headers' - lib/beam_mcp/transport/http.ex` returns exactly three lines: `:320` (the comment asserting it), - `:323` (`header_values/2`), `:391` (the `mcp-param-` sweep). Widening to all of `lib/` and to - `get_req_headers`, `fetch_query_params`, `Plug.Parsers` and any other `Plug.Conn.` call adds - nothing. There is no pattern match on `%Plug.Conn{req_headers: ...}` anywhere. The sweep at `:391` - reads only header *names*; every value still goes back through `header_values/2` via - `check_named/4`. I could not find a header read outside the set. -- **Header-name case-insensitivity is satisfied**, by the adapter rather than by this code, and I - checked that rather than assuming it. Over a real Bandit socket with `MCP-Protocol-Version`, - `Mcp-Method`, `Mcp-Name` and `Mcp-Param-Region` sent in mixed case, both `get_req_header` and the - `String.starts_with?(name, "mcp-param-")` sweep saw them: `W1 -> HTTP/1.1 400 Bad Request - dispatch=:no_dispatch` on a mismatched param, which requires the sweep to have matched. -- **Duplicate-value validation is real on all five reads.** `W2 dup Origin -> HTTP/1.1 403 - Forbidden` over the wire, plus the five in-process duplicate tests in the delta. I re-derived - mutant 9 independently (rekey `404` on the bare `-32601`, `@method_not_found` removed in the same - edit so the mutant compiles rather than being a compiler kill): killed `an unknown tool is 200 - with a JSON-RPC error, not 404`, 1 failure of 51. `logs/mutation.md`'s honest 3/5 note for mutant - 6 matches what the code does — `check_origin/2` and the version check genuinely do not route - through `all_match?/2`. -- **The `404` rekey is pinned in both directions.** Rewording the core: `sed -i 's/Method not - found:/Unimplemented method:/g' lib/beam_mcp/server.ex`, asserted 2 matches before and 2 after, - killed 3 tests — `an unimplemented method is still 404`, `the core's wording that 404 keys on is - pinned here`, and `an unimplemented method is 404, not 200`. So a reword of the core fails a test - rather than silently turning every `404` into a `200`, as the comment at `http.ex:540-542` claims. -- **Leak hunt found nothing new.** Planted `bearer-SEKRET` and `postgres://u:p@h/db` in an - `authorize/1` `{:error, reason}` and in a `raise` from `dispatch`. Neither reached a response: - `403 {"error":{"code":-32600,"message":"Forbidden"}}` and - `500 {"error":{"code":-32603,"message":"Internal error"}}`; both reached the log only. Round 1's - defect is closed. A `dispatch` returning `{:error, %{token: "bearer-SEKRET"}}` *does* relay the - token to the caller, but that is `server.ex`'s `tool_failure/1` relaying the host's own returned - value, it is unchanged by this delta, and it is post-`authorize`. Not scored. -- **Crash hunt found nothing outside the rescue.** `_meta` as a list and as a string, `method` as a - map, `method` absent, `id` as a map, `params` as a string, `arguments` as a string, a header named - exactly `mcp-param-` (empty suffix), a header name containing `"`/`<`/`>`, a non-UTF-8 `Mcp-Name` - (`<<0xFF,0xFE>>`), and a notification with no `id`. Every one answered with `conn.state == :sent` - and a JSON body: `400` for the malformed shapes, `202` for the notification. No bare bodyless - `500`, no missing response, no `Jason.EncodeError` escaping. Claim 4 holds against everything I - could throw at it. -- **Comma-folded header values fail closed.** `Mcp-Method: tools/list, tools/call` on a single line - arrives as one value and does not equal the body's `method`: `W6 -> HTTP/1.1 400 Bad Request`. -- **The protocol-version header does not inherit F1** — but only by accident, and the record should - say so. An encoded `MCP-Protocol-Version` is refused: `P4 -> 400 - {"error":{"code":-32022,"data":{"requested":"=?base64?MjAyNi0wNy0yOA==?=","supported":["2026-07-28"]}}}`. - That is `compare_versions/3:477` comparing the **raw** value against `@modern_version`, not intent. - If that branch ever moved to `all_match?/2`, F1 would extend to the version header immediately. -- **`Origin` does not inherit F1.** `check_origin/2:229` is set membership on raw values with no - decoding, so `=?base64?...?=` cannot launder an origin. -- **The `-32022` `data.requested` reflection is the caller's own header** and is required by the - spec's `UnsupportedProtocolVersionError` shape. Not scored. -- **`check_origin/2` runs before `authorize/2`**, so an unauthenticated caller can distinguish - `"Origin not allowed"` from `"Forbidden"` and enumerate the host's allow list. The spec mandates - the `403` for a bad Origin (`:57-61`), and an allow list is not normally a secret. Judged not a - finding; recorded because it is a real ordering property someone may want to revisit. -- **`:tool_catalog` behaviour check (claim 6)** — the delta's test covers `true`, a string, `Enum` - and `:not_a_module`. I found no value that passes `is_atom and != nil and Code.ensure_loaded? and - function_exported?(:all, 0)` while failing at the first `tools/list`. No finding. - ---- - -## Summary of what would clear the verdict - -F1, F2 and F3 are the blocking three. F1 and F4 are one function each. F2 and F3 share a mechanism — -read the catalog's `x-mcp-header` annotations and resolve suffix → property path through them — so -they are one piece of work, and the alternative for F2 (delete the enforcement claim and record it -as not implemented) is a valid resolution if the schema read is deferred. F5 is one clause. F6–F8 -are recorded, not blocking, but F8's first half is a consequence of F2 and goes away with it. diff --git a/slices/002-streamable-http/logs/round3.s1.tree b/slices/002-streamable-http/logs/round3.s1.tree deleted file mode 100644 index 797e1dd1..00000000 --- a/slices/002-streamable-http/logs/round3.s1.tree +++ /dev/null @@ -1 +0,0 @@ -ebaaed0d918fed52e20af9031a1a8a71158bd3c9 diff --git a/slices/002-streamable-http/logs/round4.r1.tree b/slices/002-streamable-http/logs/round4.r1.tree deleted file mode 100644 index 304dda54..00000000 --- a/slices/002-streamable-http/logs/round4.r1.tree +++ /dev/null @@ -1 +0,0 @@ -89f7a2566e687c4247bab9a7f0622b32d67a2aa0 diff --git a/slices/002-streamable-http/logs/round4.r2.tree b/slices/002-streamable-http/logs/round4.r2.tree deleted file mode 100644 index 304dda54..00000000 --- a/slices/002-streamable-http/logs/round4.r2.tree +++ /dev/null @@ -1 +0,0 @@ -89f7a2566e687c4247bab9a7f0622b32d67a2aa0 diff --git a/slices/002-streamable-http/logs/round4.s1.md b/slices/002-streamable-http/logs/round4.s1.md deleted file mode 100644 index 316b186c..00000000 --- a/slices/002-streamable-http/logs/round4.s1.md +++ /dev/null @@ -1,406 +0,0 @@ -# Round 4 — lane s1 (security, by exploit) - -Tree read: `89f7a2566e687c4247bab9a7f0622b32d67a2aa0` (matches the expected hash; recorded in -`slices/002-streamable-http/logs/round4.s1.tree`). - -Scope: `git diff ebaaed0d918fed52e20af9031a1a8a71158bd3c9 HEAD` — round 3's fixes plus the record -commit. - -## VERDICT: changes required - -Three findings block a publish. Two of them are in **one function**, `value_matches?/2`, which this -delta introduced to replace `to_comparable/1`, and both are **measured regressions against -`ebaaed0d`**: an input that returned `400` before this delta now returns `500`, and an input that -returned `400` before this delta now returns `200` and dispatches. That is the pattern this round -was convened to look for, and it is the same shape as round 3's: the fix for one MUST reopened a -hole the other MUST closes. - -The three things I was asked to verify by exploit are, in themselves, **fixed and holding**: -base64 decoding is correctly scoped, the omitted-header MUST is enforced, and the second copy of -the rescue does reach `fault_response/4`. Finding 3 is a consequence of that third fix being -applied to the copy it does not fit. - -## Where the probes ran - -All probes ran against a live `Bandit 1.12.5` on a real socket, never `Plug.Test`. - -- Post-delta server: `cp -a` of the worktree to - `/tmp/claude-1000/-home-aylac-Projects-hacktui-hermes/775c8d71-6ac1-4653-8798-382001e76089/scratchpad/lane4-s1`, - with `.git` and `_build` removed and rebuilt. Bound `127.0.0.1:4911`. -- Pre-delta baseline for the regression proof: `git archive ebaaed0d918fed52e20af9031a1a8a71158bd3c9` - extracted to `.../scratchpad/base-ebaaed0`, `deps/` and `mix.lock` copied in, compiled fresh. - Bound `127.0.0.1:4912`. -- Nothing in `/home/aylac/Projects/beam_mcp-wt/002-http` was modified except this file and - `round4.s1.tree`. Nothing in `/home/aylac/Projects/hacktui_hermes` was touched. -- The probe catalog carries seven tools covering the schema shapes named in the brief: colliding - annotations, an annotation inside `items` and inside `oneOf`, an annotation on a non-primitive - and on a `number`, a non-map `properties`, and two tools whose dispatch raises — one plain and - one carrying `plug_status`, each with a planted secret in its message. - ---- - -## Finding 1 — BLOCKS PUBLISH - -**An attacker-chosen JSON integer crashes header validation into an unauthenticated `500` with an -error-level stacktrace. Pre-delta the same request was a `400`.** - -`lib/beam_mcp/transport/http.ex:414-419`, the raise at **:416**: - -```elixir -defp value_matches?(header_value, body_value) when is_integer(body_value) do - case Float.parse(header_value) do - {parsed, ""} -> parsed == body_value * 1.0 # <- :416 - _ -> false - end -end -``` - -`body_value` is a JSON integer the caller wrote. Erlang integers are arbitrary-precision; floats -are not. `body_value * 1.0` raises `ArithmeticError` for any integer whose magnitude exceeds the -float range (~1.8e308), which JSON expresses in 310 characters. - -Observed vs expected: expected `400` `-32020` (header does not match body). Observed `500` -`-32603` plus ~750 bytes of `[error]` stacktrace per request. - -**Three independent reachable paths, all before dispatch, none needing a tool:** - -``` -$ BIG=$(python3 -c "print('9'*400)") - -# (a) via _meta protocolVersion -- reached in check_protocol_version, before any catalog lookup -$ curl -s -w '\nHTTP %{http_code}\n' -X POST http://127.0.0.1:4911/ \ - -H 'content-type: application/json' -H 'MCP-Protocol-Version: 1' -H 'Mcp-Method: tools/list' \ - --data-binary "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"_meta\":{\"io.modelcontextprotocol/protocolVersion\":$BIG}}" -{"error":{"code":-32603,"message":"Internal error"},"id":null,"jsonrpc":"2.0"} -HTTP 500 - -# (b) via params.name on tools/call -- check_name_header -# (c) via a Mcp-Param-{Name} on an annotated integer property -- check_param_headers -# (d) via the method itself: -$ N=$(python3 -c "print('1'+'0'*309)") -$ curl ... -H 'Mcp-Method: 1' --data-binary "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":$N}" -HTTP 500 -``` - -Server log for (a): - -``` -14:00:xx [error] ** (ArithmeticError) bad argument in arithmetic expression - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:416: BeamMCP.Transport.HTTP.value_matches?/2 - (elixir 1.19.2) lib/enum.ex:4312: Enum.predicate_list/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:618: ... compare_versions/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:435: ... check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: ... handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: ... call/2 -``` - -**Proof this is a regression, not pre-existing.** Same request, same Bandit, pre-delta tree -`ebaaed0d` on port 4912: - -``` -$ curl -s -w '\nHTTP %{http_code}\n' -X POST http://127.0.0.1:4912/ ...same request... -{"error":{"code":-32020,"message":"Header mismatch: mcp-protocol-version header does not match the body value"},"id":1,"jsonrpc":"2.0"} -HTTP 400 -``` - -The delta deleted `to_comparable/1`, whose numeric clause was `to_string(value)` — total, never -raising — and replaced it with float arithmetic. The comment deleted alongside it said, in terms, -*"a refusal should not depend on the rescue to be a refusal."* That is now exactly what happens: -the header check crashes and the outer rescue converts it to `500`. - -Cost to an attacker: one request, ~330 bytes. Return: a `5xx` on a `4xx` path, and an error-level -log line per request, on a path the module's own `authorize/1` docs describe as *"possibly -unauthenticated, since authorize/1 is the host's and may permit anyone"*. - -**Not pinned.** `mix test` in the copy: `126 tests, 0 failures`. No test in the tree uses an -integer above 2^53 or beyond float range — -`grep -rn '9007\|e1[0-9]\|999999999' test/` returns nothing. - -## Finding 2 — BLOCKS PUBLISH - -**The same function accepts a header value that is a *different integer* from the body value, so -`Mcp-Param-{Name}` no longer prevents the header/body disagreement it exists to prevent. -Pre-delta this was a `400`.** - -`lib/beam_mcp/transport/http.ex:414-419`. `Float.parse(header_value) == body_value * 1.0` compares -two IEEE-754 doubles. Above 2^53 that map is not injective: distinct integers land on one float. - -``` -$ curl -s -w '\nHTTP %{http_code}\n' -X POST http://127.0.0.1:4911/ \ - -H 'content-type: application/json' -H 'MCP-Protocol-Version: 2026-07-28' \ - -H 'Mcp-Method: tools/call' -H 'Mcp-Name: echo' \ - -H 'Mcp-Param-maxRows: 9007199254740992' \ - --data-binary '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"echo","arguments":{"max_rows":9007199254740993}}}' -{"id":1,...,"result":{...,"structuredContent":{"max_rows":9007199254740993}}} -HTTP 200 -``` - -The header says `...992`. The tool ran with `...993`. `200`, dispatched. This is the load-balancer -disagreement quoted verbatim at `http.ex:357-361` as the reason the whole mechanism exists. - -Pre-delta, `ebaaed0d` on 4912, same request (header name `mcp-param-max_rows` under the old -lowercase-the-suffix derivation): - -``` -{"error":{"code":-32020,"message":"Header mismatch: mcp-param-max_rows header does not match the corresponding request body value"},"id":1,"jsonrpc":"2.0"} -HTTP 400 -``` - -**The window is ±½ulp and grows with magnitude**, so this is not a 2^53 curiosity — it is a -proportional tolerance on every mirrored integer: - -``` - body=9007199254740993 header=9007199254740992 -> HTTP 200 - body=9007199254740994 header=9007199254740992 -> HTTP 400 - body=1000000000000000001 header=1000000000000000000 -> HTTP 200 - body=1000000000000000064 header=1000000000000000000 -> HTTP 200 - body=1000000000000000128 header=1000000000000000000 -> HTTP 400 - body=1000000000000000000 header=1000000000000000064 -> HTTP 200 (symmetric) - body=-9007199254740993 header=-9007199254740992 -> HTTP 200 (negative) -``` - -At 10^18 an attacker has ±64 of free divergence between what the hop in front reads and what the -tool executes — enough for the ids, offsets, quotas and byte counts an integer parameter is -normally used for. - -Reachable through `Mcp-Name` and `MCP-Protocol-Version` too, wherever the body value is a JSON -integer, since `value_matches?/2` is shared by `check_named/4` and `compare_versions/3`. - -The SHOULD this implements (`42.0` and `42` are equal) is satisfied by comparing decimal -representations or by an exact integer parse; it does not require float arithmetic. Note also -`Mcp-Param-maxRows: 4.2e1` against body `42` returns `200` — defensible under the SHOULD, but -worth knowing that the accepted header spellings of one integer are now unbounded. - -**Not pinned.** `test/beam_mcp/transport/http_test.exs:932` tests `42` against `"42.0"` and stops -there. - -## Finding 3 — BLOCKS PUBLISH - -**`fault_response/4` is correct for the `call/2` copy and wrong for the `dispatch/3` copy: it -re-raises an exception a *host tool* raised, escaping the JSON-RPC envelope entirely.** - -`lib/beam_mcp/transport/http.ex:249-256`, reached from `http.ex:663` (the `dispatch/3` rescue). - -First, the verifications asked for, both positive: - -- **The second copy does reach it.** A host tool raising a plain `RuntimeError` returns - `{"error":{"code":-32603,...},"id":7,...}` with `HTTP 500`. The `id` is echoed, and only the - `dispatch/3` copy knows `message["id"]` — `call/2` passes `nil`. The first fix did not miss half - the problem this time. -- **Round 3's Bandit fix works.** A malformed chunked body (`Bandit.HTTPError`, - `plug_status: :bad_request`), raw socket: - - ``` - post-delta 4911: HTTP/1.1 400 Bad Request - pre-delta 4912: HTTP/1.1 500 Internal Server Error - ``` - -Now the cost. The rule "re-raise anything whose `Plug.Exception.status/1` is not 500" is derived -from adapter-raised conditions, which only ever arrive in `call/2` (from `read_body_bounded/1`). -In `dispatch/3` the exceptions come from **host application code**, and Elixir host code raises -`plug_status`-carrying exceptions routinely — `Ecto.NoResultsError` is `404`, `Ecto.Query.CastError` -is `400`. (I measured a synthetic exception with `plug_status: 404`; I did not have `ecto` in the -tree, so treat the Ecto names as the well-known instance rather than as something I ran.) - -``` -$ curl -s -D - -X POST http://127.0.0.1:4911/ -H 'content-type: application/json' \ - -H 'MCP-Protocol-Version: 2026-07-28' -H 'Mcp-Method: tools/call' -H 'Mcp-Name: boom_status' \ - --data-binary '{"jsonrpc":"2.0","id":8,"method":"tools/call","params":{"name":"boom_status","arguments":{}}}' -HTTP/1.1 404 Not Found -connection: close - -(empty body) -``` - -Observed vs expected: expected `500` with `{"jsonrpc":"2.0","id":8,"error":{"code":-32603, -"message":"Internal error"}}`, per this module's documented contract at `http.ex:651-654` -(*"The response carries NO detail... an HTTP caller learns only that the request failed"*). -Observed a bare `404`, no body, no `jsonrpc`, no `id`, and the connection closed. - -Two consequences, both concrete: - -1. **`404` is load-bearing in this transport and now collides.** `http.ex:692-700` spends ten lines - explaining that an unknown *tool* must be `200` and not `404`, because *"a conforming client - responds by abandoning the endpoint and falling back. One mistyped tool name would have taken - down the whole connection."* A host tool doing `Repo.get!(X, id)` on a tool argument now emits - that exact `404` on a missing row — and the argument is caller-controlled, so the caller - chooses when to fire it. The failure mode the delta reasoned its way out of is back through a - different door. -2. **The envelope contract breaks silently.** No `id`, so a client cannot correlate the failure to - its request; no JSON, so a client that parses every response body errors on it. - -The leak check on this path is **clean**: I planted `planted-secret-PLUGSTATUS-sk_live_AAA111` in -the `plug_status` exception's message and `planted-secret-PLAIN-sk_live_BBB222` in the plain one, -and grepped every response body. Neither appears — the re-raised response has no body at all, and -the `500` path carries the constant string. Nothing leaks; the defect is availability and contract, -not disclosure. - -Neither `CHANGELOG.md` nor `README.md` mentions this behaviour change — -`grep -n -i 'plug_status\|plug.exception\|re-rais\|reraise\|numerically\|integer' CHANGELOG.md README.md` -returns nothing. A host upgrading gets a new HTTP status class out of its own tool code with no -note. - -Minimal fix: keep the rule in `call/2`, where the adapter raises, and let `dispatch/3` answer `500` -for everything host code throws at it — or re-raise in `dispatch/3` only for the exception modules -the adapter is known to raise. Both copies going through one function is the right instinct; the -rule they share is the outer one's. - -## Finding 4 — FILE - -**Case-insensitively colliding `x-mcp-header` names silently collapse, leaving one annotated -parameter entirely unenforced, with no warning.** - -`lib/beam_mcp/transport/http.ex:529-542`. `annotations/2` accumulates into a map keyed by -`String.downcase(name)` (`:533`) and merges recursively (`:541`), so two properties annotated `Dup` -and `DUP` produce one entry and one of the two properties is never checked. - -Probe tool `collide`: `alpha` → `"Dup"`, `beta` → `"DUP"`. - -``` -$ curl ... -H 'Mcp-Param-Dup: B' \ - --data-binary '{...,"params":{"name":"collide","arguments":{"alpha":"A","beta":"B"}}}' -{"id":1,...,"structuredContent":{"alpha":"A","beta":"B"}} -HTTP 200 -``` - -`beta` is mirrored and checked; `alpha` carries a value, is annotated, has no header, and passes. -The MUST at `check_param_headers` — omitted header while the body carries the value — is not -enforced for it. Deterministic across three runs, and which of the two wins depends on map -iteration order, so with more properties it is not predictable from reading the schema. - -Why FILE and not blocking: the spec makes such a tool definition invalid, so a host that hits this -has already violated a MUST. But the server accepts the invalid definition **silently** and serves -a weaker contract than the one it advertises in `tools/list` — the annotation is published to -clients and then not enforced. A `Logger.warning` at `init/1`, or a raise, would cost little. - -## Finding 5 — FILE - -**An `x-mcp-header` on a non-primitive property makes the tool permanently uncallable, with a -refusal that does not say why.** - -`lib/beam_mcp/transport/http.ex:421-425`. The catch-all `value_matches?/2` returns `false` for -maps, lists, floats and everything else, so an annotated non-primitive can never match: - -``` -$ ...{"name":"nonprimitive","arguments":{"obj":{"k":"v"}}} (no header) -{"error":{"code":-32020,"message":"Header mismatch: Mcp-Param-Obj header is required: the body carries a value to mirror"}} HTTP 400 - -$ ...same, with -H 'Mcp-Param-Obj: anything' -{"error":{"code":-32020,"message":"Header mismatch: Mcp-Param-Obj header does not match the corresponding request body value"}} HTTP 400 - -$ ...{"num":1.5} with -H 'Mcp-Param-Num: 1.5' -{"error":{"code":-32020,"message":"Header mismatch: Mcp-Param-Num header does not match the corresponding request body value"}} HTTP 400 -``` - -Both branches are closed: the client cannot omit the header and cannot supply one. Note `number` -is caught by this too, so a host that annotates a float property — an easy mistake, since the spec -allows `integer` — ships a tool nobody can call, and the refusal blames the client's header. Same -FILE reasoning as 4: the definition is invalid per spec, but the diagnosis belongs at `init/1`, not -as a permanent runtime `400` pointing at the caller. Refusing rather than interpolating the value -is right and I am not asking for that to change. - -## Finding 6 — FILE - -**`BeamMCP.ToolCatalog.fetch/2` is now public API and its `@spec` is not honest.** - -`lib/beam_mcp/tool_catalog.ex:22-32`. `@spec fetch(module(), String.t() | atom()) :: {:ok, t} | :error`, -but three host-authored catalog shapes raise instead: - -``` -spec.name is a binary -> RAISES ArgumentError (Atom.to_string/1, :29) -all/0 returns a non-list -> RAISES Protocol.UndefinedError (:29) -module not loaded -> RAISES UndefinedFunctionError (:29) -``` - -`init/1` guards the third for the transport's own use, and all three are host bugs rather than -attacker inputs, so this is low. But the function is documented as the one lookup every caller -should use, and a public function that says `:error` and raises will be called without a rescue. -Either widen the `@spec` and say so in the `@doc`, or make the clauses total. - -## Out of the delta, noted so it is not lost - -A host schema whose `properties` is not a map crashes the **core**, not the transport: - -``` -$ ...{"name":"badschema","arguments":{"x":1}} -> HTTP 500 -** (BadMapError) expected a map, got: "not-a-map" - (stdlib 7.1) :maps.find("x", "not-a-map") - (beam_mcp 0.3.0) lib/beam_mcp/schema.ex:71: anonymous fn/3 in BeamMCP.Schema.check_properties/2 -``` - -`lib/beam_mcp/schema.ex:71` is untouched by this delta and the trigger is host misconfiguration, -not caller input. The transport's own `annotations/2` handles the same schema correctly (falls to -the `%{}` clause). Recording it rather than counting it against this round. - ---- - -## What I tried that found nothing - -Every item below was probed against the live server and came back correct. - -**Base64 sentinel scoping (round 3's fix 1) — holds.** -- `Mcp-Method: =?base64?dG9vbHMvbGlzdA==?=` with body `tools/list` → `400` `-32020`. Not decoded. - This is the exact round-3 exploit; it is closed. -- `MCP-Protocol-Version: =?base64?MjAyNi0wNy0yOA==?=` → `400` `-32022`. Not decoded, and the - refused value is echoed in `requested` rather than `List.first/1` of everything sent. -- `Mcp-Name: =?base64?ZWNobw==?=` with `params.name = "echo"` → `200`. The legitimate case works. -- Non-canonical trailing bits, `=?base64?ZWNobx==?=` → `400`. The re-encode round-trip at - `http.ex:398` admits exactly one spelling, as claimed. -- **Sentinel wrapping a sentinel**: outer payload decoding to `=?base64?ZWNobw==?=` → `400`. One - decode pass only; no recursion. -- **Mixed plain and sentinel on one header**: `Mcp-Name: echo` + `Mcp-Name: =?base64?ZWNobw==?=` - → `200`. Every value is decoded and compared, not just the first. -- I looked for a sentinel whose decoded content is another header's value and found no path: the - decode set is decided by the *canonical name this module passes in*, never by anything the - client writes, and the header names themselves are matched by `get_req_header/2` byte-for-byte. - -**Multi-value validation.** Duplicate `Mcp-Param-Region`, good-then-hostile and hostile-then-good -→ `400` both orders. `Enum.all?` over every value holds on the new param path too. - -**The `Mcp-Param-{Name}` derivation (round 3's fix 2) — the MUST is enforced.** -- Header omitted, `region` in body → `400` `-32020` *"is required: the body carries a value to - mirror"*. This is the spec row round 3 found unenforced; it is closed. -- Same for a **nested** annotation (`outer.inner` → `Nested`) → `400` when omitted, `200` when - supplied. The property-path walk works. -- Header lies → `400`. Header matches → `200`. -- Header sent with no such value in the body, and with an explicit JSON `null` → `400` both. -- Annotation inside `items` and inside `oneOf` → **ignored**, request served `200`. `annotations/2` - recurses through `properties` only (`http.ex:541`), which is what the spec's forbidden-chain rule - requires. I confirmed the annotated values were present in the body and still not demanded. -- A `mcp-param-*` header the schema does not name → ignored (`200`), per the quoted - forward-and-ignore rule. A hostile suffix (`Mcp-Param-../../etc/passwd`) never reaches this code: - Bandit rejects the malformed header name at the parser with `400`. -- `Mcp-Param-*` on a non-`tools/call` method → ignored, `200`. - -**Malformed JSON shapes into the new derivation — no crash, correct refusals.** -`params` a list, `params.name` a map, `params.arguments` a list, an annotated argument whose value -is a map, and a nested path whose parent is a list. All `400` or a `200` carrying the core's -`isError` result; none reached a `500`. - -**`@removed_in_modern` — no bypass found.** `ping`, `initialize`, `notifications/initialized` with -an id → `404` `-32601`; as notifications → `202`; `"Ping"` (case) → `404` via the core; -`" ping"` (whitespace) → `400` at the header check; `"id": null` explicitly → `202`; a batch -array body → `400` *"Expected a JSON object, got an array"*; `initialize` carrying -`_meta` `"2025-11-25"` → `400`, so the legacy-era discriminator cannot be smuggled past the -transport's modern stamp. The pre-fix behaviour the CHANGELOG describes — `200` with -`protocolVersion: "2025-11-25"` — is gone. - -**Leak sweep — clean.** Planted `sk_live_`-shaped secrets in a host exception message (plain and -`plug_status`-carrying), and checked the authorize-refusal, unknown-tool, unknown-method, header -mismatch, unsupported-version, oversized-body and parse-error bodies. Grepping every captured -response for `planted-secret`, `Elixir.`, `lib/beam_mcp` returns nothing. No reason term, no -stacktrace, no schema fragment and no body value reaches the caller. `authorize/1`'s reason goes to -`Logger.info` only, as `http.ex:298-301` claims. The one caller-visible reflection is the attacker's -own rejected header value in `data.requested`, which is their input coming back JSON-encoded. - -**Header-population derivation.** `grep -n 'get_req_header' lib/beam_mcp/transport/http.ex` returns -one hit, `header_values/2` at `:377`. The claim at `http.ex:365-369` that every header read goes -through it is true of the delta; the `mcp-param-` sweep the old comment mentioned is gone with the -schema derivation. - -**Ordering.** `check_headers/3` validates `Mcp-Name` (`:437`) before the param headers (`:438`), and -`mirrored_params/2` looks the tool up by `params.name` — so there is no window in which the -transport reads tool A's schema while tool B is dispatched. - -**Suite state.** `mix test` in the copy: `126 tests, 0 failures`. The suite is green with findings -1, 2 and 4 live. diff --git a/slices/002-streamable-http/logs/round4.s1.tree b/slices/002-streamable-http/logs/round4.s1.tree deleted file mode 100644 index 304dda54..00000000 --- a/slices/002-streamable-http/logs/round4.s1.tree +++ /dev/null @@ -1 +0,0 @@ -89f7a2566e687c4247bab9a7f0622b32d67a2aa0 diff --git a/slices/002-streamable-http/logs/spec-basic-versioning.md b/slices/002-streamable-http/logs/spec-basic-versioning.md deleted file mode 100644 index 61cbb588..00000000 --- a/slices/002-streamable-http/logs/spec-basic-versioning.md +++ /dev/null @@ -1,185 +0,0 @@ -> ## Documentation Index -> Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt -> Use this file to discover all available pages before exploring further. - -# Versioning and Compatibility - -
- -This page defines how a client and server agree on what they are speaking: -the protocol version, declared on every request; optional extensions, -negotiated through capabilities; and interoperability with earlier, -handshake-based protocol revisions. - -There is no negotiation handshake. Every request carries its protocol -version, and the server accepts or rejects each request independently: - -```mermaid theme={null} -sequenceDiagram - participant Client - participant Server - - Client->>Server: request (with `_meta`) - alt server supports requested version - Server-->>Client: result - else version unsupported - Server-->>Client: UnsupportedProtocolVersionError - Note over Client,Server: Client retries with a mutually supported version - end -``` - -## Terminology - -This page uses the following terms for interoperability across protocol -revisions: - -* **Modern**: protocol versions that convey version, identity, and - capabilities as per-request metadata (revision `2026-07-28` and later). -* **Legacy**: protocol versions that establish a session with an - `initialize` handshake (`2025-11-25` and earlier). -* **Dual-era**: an implementation that supports both modern and legacy - versions. - -## Protocol Version Negotiation - -Every request declares the protocol version it is using in its -[`_meta`](/specification/2026-07-28/basic/index#meta) field. On HTTP, this is -also carried in the -[`MCP-Protocol-Version` header](/specification/2026-07-28/basic/transports/streamable-http#protocol-version-header). - -If the server does not implement the requested version (whether the version -is unknown to the server, or is a known version the server has chosen not to -support), it **MUST** respond with an -[`UnsupportedProtocolVersionError`](/specification/2026-07-28/schema#unsupportedprotocolversionerror) -listing the versions it does support: - -```json theme={null} -{ - "jsonrpc": "2.0", - "id": 1, - "error": { - "code": -32022, - "message": "Unsupported protocol version", - "data": { - "supported": ["2026-07-28", "2025-11-25"], - "requested": "1900-01-01" - } - } -} -``` - -The client **SHOULD** select a mutually supported version from the `supported` -list and retry the request, or surface an error to the user if no compatible -version exists. - -Servers **MUST** implement -[`server/discover`](/specification/2026-07-28/server/discover). Clients -**MAY** call it before sending any other requests to learn the server's -supported versions up front, but are not required to: a client is free to -invoke any RPC inline and handle `UnsupportedProtocolVersionError` if its -preferred version is not supported. - -## Extension Negotiation - -Clients and servers can negotiate support for optional -[extensions](/docs/extensions/overview) beyond the core protocol. Extensions -are advertised in the `extensions` field of capabilities, which is a map of -extension identifiers to per-extension settings objects. Extension identifiers -**MUST** follow the [`_meta` key naming rules](/specification/2026-07-28/basic/index#meta), -with a mandatory prefix. - -The following is an example of a client that advertises the -[MCP Apps extension](/extensions/apps/overview) identified as `io.modelcontextprotocol/ui`: - -```json theme={null} -{ - "capabilities": { - "roots": {}, - "extensions": { - "io.modelcontextprotocol/ui": { - "mimeTypes": ["text/html;profile=mcp-app"] - } - } - } -} -``` - -An example of [Tasks extension](/extensions/tasks/overview) identified as `io.modelcontextprotocol/tasks`: - -```json theme={null} -{ - "capabilities": { - "tools": {}, - "extensions": { - "io.modelcontextprotocol/tasks": {} - } - } -} -``` - -Each extension specifies the schema of its settings object; an empty object -indicates support with no additional settings. - -If one party supports an extension but the other does not, the supporting -party **MUST** either revert to core protocol behavior or reject the request -with an appropriate error. Extensions **SHOULD** document their expected -fallback behavior. - -## Backward Compatibility with Initialization-Based Versions - -A server that wishes to support both [legacy](#terminology) clients (which -expect an `initialize` handshake) and [modern](#terminology) clients (which -use per-request metadata) **MAY** implement both behaviors. - -A client that needs to interoperate with both kinds of servers detects the -server's era with transport-specific mechanics, specified in the binding -pages: - -* [stdio](/specification/2026-07-28/basic/transports/stdio#backward-compatibility): - probe with `server/discover` and fall back on any error that is not a - recognized modern error. -* [Streamable HTTP](/specification/2026-07-28/basic/transports/streamable-http#backward-compatibility): - attempt a modern request and inspect the body of a `400 Bad Request` - before falling back. - -In both cases, a recognized modern JSON-RPC error (such as -[`UnsupportedProtocolVersionError`](/specification/2026-07-28/schema#unsupportedprotocolversionerror)) -identifies a modern server: the client retries with a supported version -rather than falling back. Anything else identifies a legacy server. - -The era determination is a property of the server, not of an individual -request. Clients **SHOULD** cache the result for the lifetime of the server -process (stdio) or origin (HTTP), and **MAY** persist it across restarts of -the same server configuration, re-probing if the cached assumption later -fails. - -A server that supports only [modern](#terminology) versions **SHOULD** name -the protocol versions it supports in any error it returns to an `initialize` -request, on any transport: legacy clients have no fall-forward mechanism, and -this message may be the only diagnostic they can surface to users. - -### Compatibility Matrix - -The following matrix summarizes the expected outcome of every combination of -client and server era: - -| Client | Server | Outcome | -| -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Modern | Modern | Works. `server/discover` is optional; version mismatches surface as `UnsupportedProtocolVersionError` and the client retries with a mutually supported version. | -| Modern | Legacy | Fails. The server may reject the request with an implementation-defined error, stay silent, or even process an era-ambiguous method under legacy semantics. On stdio, clients **SHOULD** send `server/discover` first to fail deterministically; the client then surfaces an actionable error to the user. | -| Dual-era | Modern | Works. The stdio probe returns a `DiscoverResult` (or `UnsupportedProtocolVersionError`); on HTTP, the first modern request succeeds or returns a modern error. The client stays modern. | -| Dual-era | Legacy | Works. stdio: the probe returns a non-modern error or times out, and the client falls back to `initialize`. HTTP: the modern request returns a `4xx` without a recognized modern error body, and the client falls back to `initialize` (and possibly further to the deprecated HTTP+SSE transport). | -| Legacy | Modern | Fails. stdio: the server rejects `initialize` with a JSON-RPC error; the exact code is implementation-defined (`initialize` is an unknown method and the request also lacks the required `_meta` fields). HTTP: the request is missing the required headers and is rejected per [server validation](/specification/2026-07-28/basic/transports/streamable-http#server-validation) with `400 Bad Request` (a client on the deprecated HTTP+SSE transport fails at its opening `GET` instead). Legacy clients have no fall-forward mechanism. | -| Legacy | Dual-era | Works. The server answers `initialize` and serves the client according to the negotiated legacy revision. | -| Legacy | Legacy | Works according to the legacy revision; out of scope for this document. | - -A dual-era **server** selects its behavior from how the client opens: - -* A request carrying modern per-request `_meta` is served statelessly - according to this revision. -* An `initialize` request selects legacy semantics, scoped to the stdio - process (stdio) or the session (HTTP), as specified by the negotiated - legacy protocol version. - -A dual-era server **MAY** serve both eras concurrently on the same endpoint -or process. diff --git a/slices/002-streamable-http/logs/spec-changelog.md b/slices/002-streamable-http/logs/spec-changelog.md deleted file mode 100644 index c87ef692..00000000 --- a/slices/002-streamable-http/logs/spec-changelog.md +++ /dev/null @@ -1,123 +0,0 @@ -> ## Documentation Index -> Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt -> Use this file to discover all available pages before exploring further. - -# Key Changes - -
- -This document lists changes made to the Model Context Protocol (MCP) specification since -the previous revision, [2025-11-25](/specification/2025-11-25). - -## Major changes - -1. Remove protocol-level sessions and the `Mcp-Session-Id` header from the Streamable HTTP transport. List endpoints (`tools/list`, `resources/list`, `prompts/list`) no longer vary per-connection. Servers that need cross-call state use explicit, server-minted handles passed as ordinary tool arguments ([SEP-2567](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2567)). - -2. Make MCP stateless: remove the `initialize`/`notifications/initialized` handshake. Every request now carries its protocol version and client capabilities in `_meta` (`io.modelcontextprotocol/protocolVersion`, `io.modelcontextprotocol/clientCapabilities`). Clients SHOULD identify themselves on each request (`io.modelcontextprotocol/clientInfo`), and servers SHOULD identify themselves in each result's `_meta` (`io.modelcontextprotocol/serverInfo`). Version mismatches return `UnsupportedProtocolVersionError` ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -3. Add `server/discover`: servers MUST implement this RPC to advertise their supported protocol versions, capabilities, and identity. Clients MAY call it before any other request for up-front version selection, or use it as a backward-compatibility probe on STDIO ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -4. Replace the HTTP GET endpoint and `resources/subscribe`/`resources/unsubscribe` with `subscriptions/listen`: a single long-lived POST-response stream for opted-in server-to-client change notifications. Clients opt in to specific types (`toolsListChanged`, `promptsListChanged`, `resourcesListChanged`, `resourceSubscriptions`); the server acknowledges and tags notifications with `io.modelcontextprotocol/subscriptionId`. Request-scoped notifications such as `notifications/progress` and `notifications/message` continue to flow on the response stream of the request they relate to, not the `subscriptions/listen` stream ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -5. Remove `ping`, `logging/setLevel`, and `notifications/roots/list_changed`. Log level is now set per-request via `io.modelcontextprotocol/logLevel` in `_meta`; servers MUST NOT emit `notifications/message` for requests that did not include this field ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -6. Move experimental tasks out of the core protocol and into an official extension (`io.modelcontextprotocol/tasks`). The redesigned extension replaces the blocking `tasks/result` method with polling via `tasks/get` and a new `tasks/update` for client-to-server input, removes `tasks/list`, and allows servers to return task handles unsolicited without per-request opt-in ([SEP-2663](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2663)). - -7. Multi Round-Trip Requests (MRTR) pattern introduced which replaces the previous approach of sending server-initiated requests, such as `roots/list`, `sampling/createMessage`, or `elicitation/create`. Servers return an `InputRequiredResult` (`resultType: "input_required"`) whose `inputRequests` field carries the requests for the additional information needed to process the request. Clients respond with `inputResponses` on a retry of the original request providing the requested information. ([SEP-2322](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2322)). - -8. All results now carry a required `resultType` field: `"complete"` for ordinary results and `"input_required"` for [multi round-trip request](/specification/2026-07-28/basic/patterns/mrtr) interim results. Clients **MUST** treat results from earlier-protocol servers that omit the field as `"complete"` ([SEP-2322](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2322)). - -9. Remove SSE stream resumability and message redelivery (the `Last-Event-ID` header and SSE event IDs) from the Streamable HTTP transport. A broken response stream loses the in-flight request; clients **MUST** re-issue it as a new request with a new request ID ([SEP-2575](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2575)). - -## Minor changes - -1. Add `extensions` field to `ClientCapabilities` and `ServerCapabilities` to support optional [extensions](/docs/extensions/overview) beyond the core protocol. -2. Document OpenTelemetry trace context propagation conventions for `_meta` keys (`traceparent`, `tracestate`, `baggage`) ([SEP-414](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/414)). -3. Servers **SHOULD** return tools from `tools/list` in a deterministic order to enable client-side caching and improve LLM prompt cache hit rates. -4. Require standard MCP request headers (`Mcp-Method`, `Mcp-Name`) on Streamable HTTP POST requests, and add support for custom headers from tool parameters via `x-mcp-header` ([SEP-2243](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2243)). -5. Require `ttlMs` and `cacheScope` fields on results returned by `tools/list`, `prompts/list`, `resources/list`, `resources/read`, and `resources/templates/list` via a new `CacheableResult` interface. `ttlMs` is a freshness hint (in milliseconds) allowing clients to cache responses and reduce polling; `cacheScope` (`"public"` or `"private"`) controls whether shared intermediaries may cache the response. Both fields complement existing `listChanged` notifications ([SEP-2549](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2549)). -6. Change resource not found error code from `-32002` to `-32602` (Invalid Params) to align with JSON-RPC specification. -7. Authorization servers **SHOULD** include the `iss` parameter in authorization responses per - [RFC 9207](https://datatracker.ietf.org/doc/html/rfc9207), and MCP clients **MUST** validate a - present `iss` against the recorded issuer before redeeming the authorization code - ([SEP-2468](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2468)). -8. Require MCP clients to specify an appropriate `application_type` during Dynamic Client - Registration to avoid OpenID Connect redirect URI conflicts - ([SEP-837](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/837)). -9. Clarify that client credentials are bound to the authorization server that issued them: - clients **MUST** key persisted credentials by the issuer identifier, **MUST NOT** reuse them - with a different authorization server, and **MUST** re-register when the authorization server - changes ([SEP-2352](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2352)). -10. Loosen `inputSchema` and `outputSchema` to allow any JSON Schema 2020-12 keywords, and - `structuredContent` to allow any JSON value. Add `$ref` resolution requirements and - composition-keyword resource bounds - ([SEP-2106](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2106)). -11. Remove the `notifications/elicitation/complete` notification and the - `elicitationId` field of URL mode elicitation requests, both introduced in - `2025-11-25`. Under the - [Multi Round-Trip Requests](/specification/2026-07-28/basic/patterns/mrtr) pattern, the - client learns the outcome of an out-of-band interaction by retrying the original - request, so a server-initiated completion signal — and the identifier used to - correlate it — no longer fit the protocol. Servers needing to correlate an - elicitation across retries encode their own identifier in `requestState`. -12. Define an [error code allocation policy](/specification/2026-07-28/basic/index#error-codes) - partitioning the JSON-RPC server-error range: `-32000` to `-32019` remains - implementation-defined (existing SDK usage is grandfathered), `-32020` to `-32099` is - reserved for the MCP specification. Renumber the error codes introduced in this draft - accordingly — `HeaderMismatch` `-32001` → `-32020`, `MissingRequiredClientCapability` - `-32003` → `-32021`, `UnsupportedProtocolVersion` `-32004` → `-32022` — and add - `HeaderMismatchError` to the schema, which previously existed only in transport prose. - -## Deprecated - -Features listed here remain part of the specification but are scheduled for removal under the [feature lifecycle and deprecation policy](/community/feature-lifecycle). New implementations should not adopt them. The [deprecated features registry](/specification/2026-07-28/deprecated) tracks every feature currently in the Deprecated state. - -1. Deprecate the Roots, Sampling, and Logging features - ([SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577)). - These features remain fully functional during the deprecation window but new - implementations should not add support for them. Suggested migrations: pass - directories or files via tool parameters, resource URIs, or server - configuration instead of Roots; integrate directly with LLM provider APIs - instead of Sampling; log to `stderr` (stdio) or use OpenTelemetry instead of - Logging. - -2. Reclassify the HTTP+SSE transport (deprecated since protocol version - `2025-03-26`) as Deprecated under the feature lifecycle policy - ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)). - Migrate to [Streamable HTTP](/specification/2026-07-28/basic/transports/streamable-http). - -3. Reclassify the `includeContext` values `"thisServer"` and `"allServers"` - (soft-deprecated since protocol version `2025-11-25`) as Deprecated - ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)). - Omit the field or use `"none"`; these values will be removed no later than - the Sampling feature itself. - -4. Deprecate the OAuth 2.0 Dynamic Client Registration Protocol - ([RFC7591](https://datatracker.ietf.org/doc/html/rfc7591)) as a client registration - mechanism in favor of - [Client ID Metadata Documents](/specification/2026-07-28/basic/authorization/client-registration#client-id-metadata-documents) - ([PR #2858](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2858)). - It remains available for backwards compatibility with authorization servers that do - not support Client ID Metadata Documents. - -## Other schema changes - -1. `schema.json` now correctly reflects that the Typescript definition of minimum/maximum/default are `number`'s and not just `integers`. This was caused by running the generator using `--defaultNumberType integer` ([PR#2710](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2710)). - -## Governance and process updates - -1. Adopt a specification - [feature lifecycle and deprecation policy](/community/feature-lifecycle) - defining the Active, Deprecated, and Removed feature states, a minimum - twelve-month deprecation window, and a - [registry of deprecated features](/specification/2026-07-28/deprecated) - ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)). - -## Process changes - -1. Formalize PR-based SEP workflow with markdown files in `seps/` directory, PR-derived numbering, sponsor responsibilities, and status management via PR labels ([SEP-1850](https://github.com/modelcontextprotocol/specification/pull/1850)). - -## Full changelog - -For a complete list of all changes that have been made since the last protocol revision, -[see GitHub](https://github.com/modelcontextprotocol/specification/compare/2025-11-25...2026-07-28). diff --git a/slices/002-streamable-http/logs/spec-legacy-basic.md b/slices/002-streamable-http/logs/spec-legacy-basic.md deleted file mode 100644 index 6e62914d..00000000 --- a/slices/002-streamable-http/logs/spec-legacy-basic.md +++ /dev/null @@ -1,269 +0,0 @@ -> ## Documentation Index -> Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt -> Use this file to discover all available pages before exploring further. - -# Overview - -
- -The Model Context Protocol consists of several key components that work together: - -* **Base Protocol**: Core JSON-RPC message types -* **Lifecycle Management**: Connection initialization, capability negotiation, and - session control -* **Authorization**: Authentication and authorization framework for HTTP-based transports -* **Server Features**: Resources, prompts, and tools exposed by servers -* **Client Features**: Sampling and root directory lists provided by clients -* **Utilities**: Cross-cutting concerns like logging and argument completion - -All implementations **MUST** support the base protocol and lifecycle management -components. Other components **MAY** be implemented based on the specific needs of the -application. - -These protocol layers establish clear separation of concerns while enabling rich -interactions between clients and servers. The modular design allows implementations to -support exactly the features they need. - -## Messages - -All messages between MCP clients and servers **MUST** follow the -[JSON-RPC 2.0](https://www.jsonrpc.org/specification) specification. The protocol defines -these types of messages: - -### Requests - -[Requests](/specification/2025-11-25/schema#jsonrpcrequest) are sent from the client to the server or vice versa, to initiate an operation. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - id: string | number; - method: string; - params?: { - [key: string]: unknown; - }; -} -``` - -* Requests **MUST** include a string or integer ID. -* Unlike base JSON-RPC, the ID **MUST NOT** be `null`. -* The request ID **MUST NOT** have been previously used by the requestor within the same - session. - -### Responses - -Responses are sent in reply to requests, containing either the result or error of the operation. - -#### Result Responses - -[Result responses](/specification/2025-11-25/schema#jsonrpcresultresponse) are sent when the operation completes successfully. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - id: string | number; - result: { - [key: string]: unknown; - } -} -``` - -* Result responses **MUST** include the same ID as the request they correspond to. -* Result responses **MUST** include a `result` field. -* The `result` **MAY** follow any JSON object structure. - -#### Error Responses - -[Error responses](/specification/2025-11-25/schema#jsonrpcerrorresponse) are sent when the operation fails or encounters an error. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - id?: string | number; - error: { - code: number; - message: string; - data?: unknown; - } -} -``` - -* Error responses **MUST** include the same ID as the request they correspond to (except in error cases where the ID could not be read due a malformed request). -* Error responses **MUST** include an `error` field with a `code` and `message`. -* Error codes **MUST** be integers. - -### Notifications - -[Notifications](/specification/2025-11-25/schema#jsonrpcnotification) are sent from the client to the server or vice versa, as a one-way message. -The receiver **MUST NOT** send a response. - -```typescript theme={null} -{ - jsonrpc: "2.0"; - method: string; - params?: { - [key: string]: unknown; - }; -} -``` - -* Notifications **MUST NOT** include an ID. - -## Auth - -MCP provides an [Authorization](/specification/2025-11-25/basic/authorization) framework for use with HTTP. -Implementations using an HTTP-based transport **SHOULD** conform to this specification, -whereas implementations using STDIO transport **SHOULD NOT** follow this specification, -and instead retrieve credentials from the environment. - -Additionally, clients and servers **MAY** negotiate their own custom authentication and -authorization strategies. - -For further discussions and contributions to the evolution of MCP's auth mechanisms, join -us in -[GitHub Discussions](https://github.com/modelcontextprotocol/specification/discussions) -to help shape the future of the protocol! - -## Schema - -The full specification of the protocol is defined as a -[TypeScript schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-11-25/schema.ts). -This is the source of truth for all protocol messages and structures. - -There is also a -[JSON Schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-11-25/schema.json), -which is automatically generated from the TypeScript source of truth, for use with -various automated tooling. - -## JSON Schema Usage - -The Model Context Protocol uses JSON Schema for validation throughout the protocol. This section clarifies how JSON Schema should be used within MCP messages. - -### Schema Dialect - -MCP supports JSON Schema with the following rules: - -1. **Default dialect**: When a schema does not include a `$schema` field, it defaults to [JSON Schema 2020-12](https://json-schema.org/draft/2020-12/schema) -2. **Explicit dialect**: Schemas MAY include a `$schema` field to specify a different dialect -3. **Supported dialects**: Implementations MUST support at least 2020-12 and SHOULD document which additional dialects they support -4. **Recommendation**: Implementors are RECOMMENDED to use JSON Schema 2020-12. - -### Example Usage - -#### Default dialect (2020-12): - -```json theme={null} -{ - "type": "object", - "properties": { - "name": { "type": "string" }, - "age": { "type": "integer", "minimum": 0 } - }, - "required": ["name"] -} -``` - -#### Explicit dialect (draft-07): - -```json theme={null} -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "name": { "type": "string" }, - "age": { "type": "integer", "minimum": 0 } - }, - "required": ["name"] -} -``` - -### Implementation Requirements - -* Clients and servers **MUST** support JSON Schema 2020-12 for schemas without an explicit `$schema` field -* Clients and servers **MUST** validate schemas according to their declared or default dialect. They **MUST** handle unsupported dialects gracefully by returning an appropriate error indicating the dialect is not supported. -* Clients and servers **SHOULD** document which schema dialects they support - -### Schema Validation - -* Schemas **MUST** be valid according to their declared or default dialect - -## General fields - -### `_meta` - -The `_meta` property/parameter is reserved by MCP to allow clients and servers -to attach additional metadata to their interactions. - -Certain key names are reserved by MCP for protocol-level metadata, as specified below; -implementations MUST NOT make assumptions about values at these keys. - -Additionally, definitions in the [schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2025-11-25/schema.ts) -may reserve particular names for purpose-specific metadata, as declared in those definitions. - -**Key name format:** valid `_meta` key names have two segments: an optional **prefix**, and a **name**. - -**Prefix:** - -* If specified, MUST be a series of labels separated by dots (`.`), followed by a slash (`/`). - * Labels MUST start with a letter and end with a letter or digit; interior characters can be letters, digits, or hyphens (`-`). - * Implementations SHOULD use reverse DNS notation (e.g., `com.example/` rather than `example.com/`). -* Any prefix where the second label is `modelcontextprotocol` or `mcp` is **reserved** for MCP use. - * For example: `io.modelcontextprotocol/`, `dev.mcp/`, `org.modelcontextprotocol.api/`, and `com.mcp.tools/` are all reserved. - * However, `com.example.mcp/` is NOT reserved, as the second label is `example`. - -**Name:** - -* Unless empty, MUST begin and end with an alphanumeric character (`[a-z0-9A-Z]`). -* MAY contain hyphens (`-`), underscores (`_`), dots (`.`), and alphanumerics in between. - -### `icons` - -The `icons` property provides a standardized way for servers to expose visual identifiers for their resources, tools, prompts, and implementations. Icons enhance user interfaces by providing visual context and improving the discoverability of available functionality. - -Icons are represented as an array of `Icon` objects, where each icon includes: - -* `src`: A URI pointing to the icon resource (required). This can be: - * An HTTP/HTTPS URL pointing to an image file - * A data URI with base64-encoded image data -* `mimeType`: Optional MIME type if the server's type is missing or generic -* `sizes`: Optional array of size specifications (e.g., `["48x48"]`, `["any"]` for scalable formats like SVG, or `["48x48", "96x96"]` for multiple sizes) -* `theme`: Optional theme preference (`light` or `dark`) for the icon background - -**Required MIME type support:** - -Clients that support rendering icons **MUST** support at least the following MIME types: - -* `image/png` - PNG images (safe, universal compatibility) -* `image/jpeg` (and `image/jpg`) - JPEG images (safe, universal compatibility) - -Clients that support rendering icons **SHOULD** also support: - -* `image/svg+xml` - SVG images (scalable but requires security precautions as noted below) -* `image/webp` - WebP images (modern, efficient format) - -**Security considerations:** - -Consumers of icon metadata **MUST** take appropriate security precautions when handling icons to prevent compromise: - -* Treat icon metadata and icon bytes as untrusted inputs and defend against network, privacy, and parsing risks. -* Ensure that the icon URI is either a HTTPS or `data:` URI. Clients **MUST** reject icon URIs that use unsafe schemes and redirects, such as `javascript:`, `file:`, `ftp:`, `ws:`, or local app URI schemes. - * Disallow scheme changes and redirects to hosts on different origins. -* Be resilient against resource exhaustion attacks stemming from oversized images, large dimensions, or excessive frames (e.g., in GIFs). - * Consumers **MAY** set limits for image and content size. -* Fetch icons without credentials. Do not send cookies, `Authorization` headers, or client credentials. -* Verify that icon URIs are from the same origin as the server. This minimizes the risk of exposing data or tracking information to third-parties. -* Exercise caution when fetching and rendering icons as the payload **MAY** contain executable content (e.g., SVG with [embedded JavaScript](https://www.w3.org/TR/SVG11/script.html) or [extended capabilities](https://www.w3.org/TR/SVG11/extend.html)). - * Consumers **MAY** choose to disallow specific file types or otherwise sanitize icon files before rendering. -* Validate MIME types and file contents before rendering. Treat the MIME type information as advisory. Detect content type via magic bytes; reject on mismatch or unknown types. - * Maintain a strict allowlist of image types. - -**Usage:** - -Icons can be attached to: - -* `Implementation`: Visual identifier for the MCP server/client implementation -* `Tool`: Visual representation of the tool's functionality -* `Prompt`: Icon to display alongside prompt templates -* `Resource`: Visual indicator for different resource types - -Multiple icons can be provided to support different display contexts and resolutions. Clients should select the most appropriate icon based on their UI requirements. diff --git a/slices/002-streamable-http/logs/spec-streamable-http.md b/slices/002-streamable-http/logs/spec-streamable-http.md deleted file mode 100644 index c16ddc36..00000000 --- a/slices/002-streamable-http/logs/spec-streamable-http.md +++ /dev/null @@ -1,734 +0,0 @@ -> ## Documentation Index -> Fetch the complete documentation index at: https://modelcontextprotocol.io/llms.txt -> Use this file to discover all available pages before exploring further. - -# Streamable HTTP - -
- - - Streamable HTTP was introduced in protocol version 2025-03-26 as a replacement - for the [HTTP+SSE transport][http-sse] from protocol version 2024-11-05. - - - - Revision 2026-07-28 changed the behavior of Streamable HTTP. Clients must - ensure they handle backwards compatibility correctly. Changes included: - - * Removal of the GET stream endpoint. - * Removal of protocol-level sessions. - - See the [changelog](/specification/2026-07-28/changelog) and - [Backward Compatibility](#backward-compatibility) below. - - -In the **Streamable HTTP** transport, the server operates as an independent -process that can handle multiple client connections. At a glance: - -* The server exposes a single HTTP endpoint (the **MCP endpoint**) that - accepts POST. -* The client sends every JSON-RPC request or notification as its own HTTP - POST. -* The server answers each request with either a single JSON object or a - [Server-Sent Events][sse] (SSE) stream scoped to that request, carrying - request-related notifications followed by the final response. -* Server-to-client interactions (sampling, elicitation, roots) are embedded - in results as input requests per - [Multi Round-Trip Requests (MRTR)][mrtr] ([SEP-2322][sep-2322]). -* Long-lived change notifications (such as list changes and resource updates) - are delivered on the response stream of a - [`subscriptions/listen`][subscriptions-listen] request. - -See [Message Flow](#message-flow) for sequence diagrams of these -interactions. - -The server **MUST** provide a single HTTP endpoint path (hereafter referred to -as the **MCP endpoint**) that supports POST. For example, this could be a URL -like `https://example.com/mcp`. - -[http-sse]: /specification/2024-11-05/basic/transports#http-with-sse - -[sse]: https://en.wikipedia.org/wiki/Server-sent_events - -## Security & Endpoint - -When implementing Streamable HTTP transport: - -1. Servers **MUST** validate the `Origin` header on all incoming connections - to prevent DNS rebinding attacks. - * If the `Origin` header is present and invalid, servers **MUST** respond - with HTTP 403 Forbidden. The HTTP response body **MAY** comprise a - JSON-RPC *error response* that has no `id`. -2. When running locally, servers **SHOULD** bind only to localhost - (127.0.0.1) rather than all network interfaces (0.0.0.0). -3. Servers **SHOULD** implement proper authentication for all connections. - -Without these protections, attackers could use DNS rebinding to interact with -local MCP servers from remote websites. - -## Sending Messages - -Every JSON-RPC message sent from the client **MUST** be a new HTTP POST -request to the MCP endpoint. - -1. The client **MUST** use HTTP POST to send JSON-RPC messages. -2. The client **MUST** include an `Accept` header listing both - `application/json` and `text/event-stream` as supported content types. -3. The client **MUST** include the [request metadata headers](#request-metadata) - on each POST request. -4. The body of the HTTP POST **MUST** be a single JSON-RPC *request* or - *notification*. The client **MUST NOT** send JSON-RPC *responses*. -5. If the body is a JSON-RPC *notification*: - * If the server accepts it, the server **MUST** return HTTP status code - `202 Accepted` with no body. - * If the server cannot accept it, it **MUST** return an HTTP error status - code (e.g., `400 Bad Request`). The HTTP response body **MAY** comprise - a JSON-RPC *error response* that has no `id`. -6. If the body is a JSON-RPC *request*, the server **MUST** return either - `Content-Type: application/json` (a single JSON object) or - `Content-Type: text/event-stream` (an SSE response stream). The client - **MUST** support both. - - - This revision of the core protocol defines no client-to-server - *notifications* over Streamable HTTP. The only client-sent notification in - the core protocol, `notifications/cancelled`, is used only on the - [stdio](/specification/2026-07-28/basic/transports/stdio) transport; on - Streamable HTTP, closing the SSE response stream is itself the cancellation - signal and no `notifications/cancelled` message is expected (see - [Cancellation][cancellation]). The notification rules above describe the - transport mechanics for a notification POST; header requirements for - notification POSTs are not defined by this revision. - - -## Receiving Messages - -When the server returns an SSE response stream -(`Content-Type: text/event-stream`): - -* The server **MAY** send JSON-RPC *notifications* — for example, - [`notifications/progress`][notifications-progress] - or [`notifications/message`][notifications-message] — - before the final response. These notifications **MUST** relate to the - originating client request. -* The server **MUST NOT** send independent JSON-RPC *requests* on this stream. - Server-to-client interactions (sampling, elicitation, list-roots) are - embedded as input requests inside an - [`InputRequiredResult`][input-required-result] per - [MRTR][mrtr] ([SEP-2322][sep-2322]), not delivered as separate requests on - this or any other stream. This is a change from Streamable HTTP in protocol - versions `2025-03-26` through `2025-11-25`, where servers could send such - requests on SSE streams. -* The final JSON-RPC *response* **SHOULD** terminate the stream. - -Long-lived notification streams are obtained by sending a -[`subscriptions/listen`][subscriptions-listen] -request. The server's response is itself an SSE stream that stays open and -delivers the change notifications the client opted in to (such as -`notifications/tools/list_changed` or `notifications/resources/updated`). -Request-scoped notifications like `notifications/progress` and -`notifications/message` are **not** delivered on the listen stream — they -flow only on the response stream of the request they relate to. - -When initiating an SSE stream, servers **SHOULD** include the -`X-Accel-Buffering: no` header in the HTTP response. This instructs reverse -proxies (such as nginx) to disable response buffering, ensuring that SSE -events are delivered to clients immediately rather than being held in a -buffer. Without this header, proxies may accumulate messages before sending -them to the client, introducing unwanted latency and potentially breaking the -real-time nature of SSE communication. - - - For long-lived streams — in particular the - [`subscriptions/listen`][subscriptions-listen] response stream — servers are - encouraged to periodically emit an SSE comment line (a line beginning with a - colon, e.g. `:\r\n`) as a keep-alive. This keeps the connection from being - closed by intermediaries or client idle timeouts during quiet periods when no - notifications are flowing. Per the [SSE specification][sse], any line beginning - with a colon is a comment that carries no event data; clients must ignore such - lines and must not treat them as malformed input. - - -Resumable SSE streams via `Last-Event-ID` are not supported. - -[notifications-progress]: /specification/2026-07-28/basic/patterns/progress - -[notifications-message]: /specification/2026-07-28/server/utilities/logging - -[input-required-result]: /specification/2026-07-28/schema#inputrequiredresult - -[mrtr]: /specification/2026-07-28/basic/patterns/mrtr - -[sep-2322]: /seps/2322-MRTR - -[subscriptions-listen]: /specification/2026-07-28/basic/patterns/subscriptions - -## Message Flow - -The following diagrams illustrate the message flows on a single MCP endpoint. - -**Requests and responses.** Each request is its own POST; the server chooses -per request whether to respond with a single JSON object or an SSE stream: - -```mermaid theme={null} -sequenceDiagram - participant Client - participant Server - - note over Client,Server: Simple response - Client->>Server: POST tools/call (JSON-RPC request) - Server-->>Client: 200 OK, application/json
JSON-RPC response - - note over Client,Server: Streaming response - Client->>Server: POST tools/call (JSON-RPC request) - note over Server: Opens SSE stream
scoped to this request - Server-->>Client: SSE: notifications/progress - Server-->>Client: SSE: notifications/progress - Server-->>Client: SSE: JSON-RPC response - note over Client,Server: Stream closes - - note over Client,Server: Notification - Client->>Server: POST (JSON-RPC notification) - Server-->>Client: 202 Accepted -``` - -**Server-to-client interactions (MRTR).** When the server needs input from -the client — sampling, elicitation, or roots — it does not send its own -JSON-RPC request. It returns an -[`InputRequiredResult`][input-required-result] containing `inputRequests`, -and the client retries the original request with the matching -`inputResponses` (see [Multi Round-Trip Requests][mrtr]): - -```mermaid theme={null} -sequenceDiagram - participant Client - participant Server - - Client->>Server: POST tools/call (id: 1) - note over Server: Needs user input or
an LLM completion - Server-->>Client: InputRequiredResult
(inputRequests: elicitation/create) - note over Client: Gathers the requested input - Client->>Server: POST tools/call (id: 2)
(original params + inputResponses) - Server-->>Client: Final result -``` - -**Change notifications.** Clients that want server-initiated change -notifications open a long-lived stream with -[`subscriptions/listen`][subscriptions-listen]; the response stream stays -open and carries only the notification types the client opted in to: - -```mermaid theme={null} -sequenceDiagram - participant Client - participant Server - - Client->>Server: POST subscriptions/listen
(notification filter) - Server-->>Client: SSE: notifications/subscriptions/acknowledged - note over Client,Server: Stream stays open - Server-->>Client: SSE: notifications/tools/list_changed - Server-->>Client: SSE: notifications/resources/updated - note over Client,Server: Until the client or server closes the stream -``` - -## Cancellation - -Closing the SSE response stream **MUST** be treated by the server as -cancellation of that request. Because each request has its own response -stream, the transport-level disconnect is unambiguous. The server **SHOULD** -stop work on the cancelled request as soon as practical and **MUST NOT** send -any further messages for it. See -[Cancellation][cancellation] for the full rules. - -[cancellation]: /specification/2026-07-28/basic/patterns/cancellation - -## Request Metadata - -The Streamable HTTP transport mirrors selected JSON-RPC body fields into HTTP -headers so that intermediaries (load balancers, gateways, observability -tooling) can route and inspect requests without parsing the body. - -### Protocol Version Header - -Every POST request to the MCP endpoint **MUST** include an -`MCP-Protocol-Version` header. - -For example: `MCP-Protocol-Version: 2026-07-28` - -The header value **MUST** match the -`io.modelcontextprotocol/protocolVersion` field carried in the request body's -`_meta`. If the values do not match, the server **MUST** reject the request -with `400 Bad Request` and a `HeaderMismatch` JSON-RPC error -(see [Server Validation](#server-validation)). - -If the server does not implement the requested protocol version (whether the -version is unknown to the server, or is a known version the server has chosen -not to support), it **MUST** respond with `400 Bad Request` and an -[`UnsupportedProtocolVersionError`][unsupported-version] -listing its supported versions. See -[Versioning: Protocol Version Negotiation][lifecycle-version] -for the negotiation flow. - -If the server does not implement the requested RPC method, it **MUST** respond -with `404 Not Found` and a JSON-RPC error with code `-32601` -(`Method not found`). The JSON-RPC error body distinguishes this case from a -`404` returned by a legacy [HTTP+SSE][http-sse] server that does not host the -modern MCP endpoint (see [Backward Compatibility](#backward-compatibility)). - -A server that supports clients implementing protocol versions earlier than -`2025-06-18` (which did not define the `MCP-Protocol-Version` header) **MAY** -treat a request that omits the header as protocol version `2025-03-26`. A -server that does not support such clients **MUST** reject a request without -the header per [Server Validation](#server-validation). - -[unsupported-version]: /specification/2026-07-28/schema#unsupportedprotocolversionerror - -[lifecycle-version]: /specification/2026-07-28/basic/versioning#protocol-version-negotiation - -### Standard Request Headers - -| Header Name | Source Field | Required For | -| ------------ | ----------------------------- | ------------------------------------------------------ | -| `Mcp-Method` | `method` | All requests | -| `Mcp-Name` | `params.name` or `params.uri` | `tools/call`, `resources/read`, `prompts/get` requests | - -These headers are **REQUIRED** for compliance. - -If the `Mcp-Name` source value cannot be safely represented as a plain ASCII -header value, clients **MUST** encode it using the Base64 sentinel format -described in [Value Encoding](#value-encoding). - -**`tools/call` request:** - -```http theme={null} -POST /mcp HTTP/1.1 -Content-Type: application/json -MCP-Protocol-Version: 2026-07-28 -Mcp-Method: tools/call -Mcp-Name: get_weather - -{ - "jsonrpc": "2.0", - "id": 1, - "method": "tools/call", - "params": { - "name": "get_weather", - "arguments": { - "location": "Seattle, WA" - }, - "_meta": { - "io.modelcontextprotocol/protocolVersion": "2026-07-28", - "io.modelcontextprotocol/clientInfo": { - "name": "ExampleClient", - "version": "1.0.0" - }, - "io.modelcontextprotocol/clientCapabilities": {} - } - } -} -``` - -**`resources/read` request:** - -```http theme={null} -POST /mcp HTTP/1.1 -Content-Type: application/json -MCP-Protocol-Version: 2026-07-28 -Mcp-Method: resources/read -Mcp-Name: file:///projects/myapp/config.json - -{ - "jsonrpc": "2.0", - "id": 2, - "method": "resources/read", - "params": { - "uri": "file:///projects/myapp/config.json", - "_meta": { - "io.modelcontextprotocol/protocolVersion": "2026-07-28", - "io.modelcontextprotocol/clientInfo": { - "name": "ExampleClient", - "version": "1.0.0" - }, - "io.modelcontextprotocol/clientCapabilities": {} - } - } -} -``` - -### Custom Headers from Tool Parameters - -MCP servers **MAY** designate specific tool parameters to be mirrored into -HTTP headers using an `x-mcp-header` extension property in the parameter's -schema within the tool's `inputSchema`. See -[Tool Definitions][tool-definitions] for -details on how to annotate tool parameters. - -While the use of `x-mcp-header` is optional for servers, clients **MUST** -support this feature. When a server's tool definition includes -`x-mcp-header` annotations, conforming clients **MUST** mirror the -designated parameter values into HTTP headers. - -[tool-definitions]: /specification/2026-07-28/server/tools#x-mcp-header - -#### Schema Extension - -The `x-mcp-header` property specifies the name portion used to construct -the header name `Mcp-Param-{name}`. - -**Constraints on `x-mcp-header` values**: - -* **MUST NOT** be empty -* **MUST** match HTTP field-name token syntax (`1*tchar`, [RFC 9110 Section 5.1](https://datatracker.ietf.org/doc/html/rfc9110#section-5.1)) -* **MUST NOT** contain control characters, including carriage return (CR, `\r`) - or line feed (LF, `\n`) -* **MUST** be case-insensitively unique among all `x-mcp-header` values in - the `inputSchema` -* **MUST** only be applied to parameters with primitive types (integer, - string, boolean). Parameters with type `number` are not permitted. - Integer values **MUST** be within the safe range for JavaScript - (−253+1 to 253−1) -* **MUST** only be applied to properties that are *statically reachable* - from the schema root: reachable via a chain consisting solely of - `properties` keys. The chain **MUST NOT** pass through `items` (or any - other array keyword), composition keywords (`oneOf`, `anyOf`, `allOf`, - `not`), conditional keywords (`if`/`then`/`else`), or `$ref`. Nested - object properties are permitted as long as every step in the chain is a - `properties` key. An `x-mcp-header` annotation anywhere else makes the - annotation — and thus the tool definition — invalid. - -Header extraction is defined as reading the instance value at the exact -property path of the annotated property (the chain of `properties` keys -leading to it). If no value is present at that path in the call arguments, -the header is omitted. - -Clients using the Streamable HTTP transport **MUST** reject tool definitions -where any `x-mcp-header` value violates these constraints. Rejection means -the client **MUST** exclude the invalid tool from the result of `tools/list`. -Clients **SHOULD** log a warning when rejecting a tool definition, including -the tool name and the reason for rejection. This ensures that a single -malformed tool definition does not prevent other valid tools from being used. -Clients using other transports (e.g., stdio) **MAY** ignore `x-mcp-header` -annotations entirely. - -**Example tool definition:** - -```json theme={null} -{ - "name": "execute_sql", - "description": "Execute SQL on Google Cloud Spanner", - "inputSchema": { - "type": "object", - "properties": { - "region": { - "type": "string", - "description": "The region to execute the query in", - "x-mcp-header": "Region" - }, - "query": { - "type": "string", - "description": "The SQL query to execute" - } - }, - "required": ["region", "query"] - } -} -``` - -**Resulting HTTP request:** - -```http theme={null} -POST /mcp HTTP/1.1 -Content-Type: application/json -MCP-Protocol-Version: 2026-07-28 -Mcp-Method: tools/call -Mcp-Name: execute_sql -Mcp-Param-Region: us-west1 - -{ - "jsonrpc": "2.0", - "id": 1, - "method": "tools/call", - "params": { - "_meta": { - "io.modelcontextprotocol/protocolVersion": "2026-07-28", - "io.modelcontextprotocol/clientInfo": { - "name": "ExampleClient", - "version": "1.0.0" - }, - "io.modelcontextprotocol/clientCapabilities": {} - }, - "name": "execute_sql", - "arguments": { - "region": "us-west1", - "query": "SELECT * FROM users" - } - } -} -``` - -#### Value Encoding - -Clients **MUST** encode parameter values before including them in HTTP -headers to ensure safe transmission and prevent injection attacks. - -**Type conversion**: Convert the parameter value to its string representation: - -* `string`: Use the value as-is -* `integer`: Convert to decimal string representation (e.g., `42`, `-7`) -* `boolean`: Convert to lowercase `"true"` or `"false"` - -Per [RFC 9110][rfc9110-values], -HTTP header field values must consist of visible ASCII characters -(0x21-0x7E), space (0x20), and horizontal tab (0x09). When a value cannot -be safely represented as a plain ASCII header value (e.g., it contains -non-ASCII characters, control characters, or has leading/trailing -whitespace), clients **MUST** use Base64 encoding of the UTF-8 -representation with the following format: - -```text theme={null} -Mcp-Param-{Name}: =?base64?{Base64EncodedValue}?= -``` - -The same encoding rule applies to the `Mcp-Name` header value. Tool and -prompt names are only **SHOULD**-constrained to header-safe characters, so a -name (or resource URI) outside the safe set is carried as: - -```text theme={null} -Mcp-Name: =?base64?{Base64EncodedValue}?= -``` - -The prefix `=?base64?` and suffix `?=` indicate that the value is -Base64-encoded. These markers are case-sensitive and **MUST** appear exactly -as shown (lowercase). Servers and intermediaries that need to inspect these -values **MUST** decode them accordingly. In particular, servers **MUST** -decode an encoded `Mcp-Name` or `Mcp-Param-{Name}` value before comparing it -to the corresponding request body value during -[Server Validation](#server-validation). - -To avoid ambiguity, clients **MUST** also Base64-encode any plain-ASCII -value that matches the sentinel pattern (i.e., starts with `=?base64?` -and ends with `?=`). - -**Encoding examples:** - -| Original Value | Reason | Encoded Header Value | -| ---------------------- | ------------------------ | ----------------------------------------------------- | -| `"us-west1"` | Plain ASCII | `Mcp-Param-Region: us-west1` | -| `"Hello, 世界"` | Contains non-ASCII | `Mcp-Param-Greeting: =?base64?SGVsbG8sIOS4lueVjA==?=` | -| `" padded "` | Leading/trailing spaces | `Mcp-Param-Text: =?base64?IHBhZGRlZCA=?=` | -| `"line1\nline2"` | Contains newline | `Mcp-Param-Text: =?base64?bGluZTEKbGluZTI=?=` | -| `"=?base64?literal?="` | Matches sentinel pattern | `Mcp-Param-Val: =?base64?PT9iYXNlNjQ/bGl0ZXJhbD89?=` | - -[rfc9110-values]: https://datatracker.ietf.org/doc/html/rfc9110#name-field-values - -#### Client Behavior - -When constructing a `tools/call` request via HTTP transport, the client -**MUST**: - -1. Extract the values for any standard headers from the request body (e.g., - `method`, `params.name`, `params.uri`). -2. Append the `Mcp-Method` header and, if applicable, `Mcp-Name` header to - the request. -3. Inspect the tool's `inputSchema` for properties marked with - `x-mcp-header` and extract the value at each annotated property's exact - property path, omitting the header when no value is present (see - [Schema Extension](#schema-extension)). -4. Encode the values according to the [Value Encoding](#value-encoding) - rules. -5. Append a `Mcp-Param-{Name}: {Value}` header to the request. - -If the server rejects a request with a -[`HeaderMismatch`](#server-validation) error because required -`Mcp-Param-*` headers are missing or do not match the body, the client -**SHOULD** call `tools/list` to check for changes to the tool's -`inputSchema`, then retry the original request with the appropriate -headers. - -#### Server Behavior for Custom Headers - -Intermediate servers that do not recognize an `Mcp-Param-{Name}` header -**MUST** forward it and otherwise ignore it, as required by the -[HTTP Semantics RFC][http-semantics]. - -Servers **MUST** reject requests with a recognized `Mcp-Param-{Name}` header -that contains invalid characters (see [Value Encoding](#value-encoding)). - -Any server that processes the message body **MUST** validate that encoded -header values, after decoding if Base64-encoded, match the corresponding -values in the request body. Servers **MUST** reject requests with a -`400 Bad Request` HTTP status and JSON-RPC error code `-32020` -(`HeaderMismatch`) if any validation fails. - -| Scenario | Client Behavior | Server Behavior | -| ---------------------------------------- | ------------------------------ | ---------------------------------------- | -| Parameter value provided | Client MUST include the header | Server MUST validate header matches body | -| Parameter value is `null` | Client MUST omit the header | Server MUST NOT expect the header | -| Parameter not in arguments | Client MUST omit the header | Server MUST NOT expect the header | -| Client omits header but value is in body | Non-conforming client | Server MUST reject the request | - -[http-semantics]: https://www.rfc-editor.org/rfc/rfc9110.html#name-field-names - -### Case Sensitivity - -Header names (called "field names" in -[RFC 9110][rfc9110-names]) -are case-insensitive. Clients and servers **MUST** use case-insensitive -comparisons for header names. Header *values* (such as method names) are -case-sensitive. - -[rfc9110-names]: https://datatracker.ietf.org/doc/html/rfc9110#name-field-names - -### Server Validation - -Servers that process the request body **MUST** reject requests where the -values specified in the headers do not match the corresponding values in the -request body. This prevents potential security vulnerabilities when -different components in the network rely on different sources of truth -(e.g., a load balancer routing on the header value while the MCP server -executes based on the body value). - - - When validating integer parameter values, servers **SHOULD** compare the - header value and the body value numerically rather than as strings (e.g., - `42.0` and `42` are considered equal). - - -When rejecting a request due to header validation failure, servers **MUST** -return HTTP status `400 Bad Request` and **MUST** include a JSON-RPC error -response using the following error code: - -| Code | Name | Description | -| -------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -| `-32020` | [`HeaderMismatch`](/specification/2026-07-28/schema#headermismatcherror) | The HTTP headers do not match the corresponding values in the request body, or required headers are missing/malformed. | - -This error code is allocated from the sub-range the MCP specification -reserves for protocol-defined errors. See -[Error Codes](/specification/2026-07-28/basic/index#error-codes). - -**Example error response:** - -```json theme={null} -{ - "jsonrpc": "2.0", - "id": 1, - "error": { - "code": -32020, - "message": "Header mismatch: Mcp-Name header value 'foo' does not match body value 'bar'" - } -} -``` - -Validation failure conditions include: - -* A required standard header (`MCP-Protocol-Version`, `Mcp-Method`, - `Mcp-Name`) is missing. -* A header value does not match the corresponding request body value. - For headers that permit the Base64 sentinel encoding (`Mcp-Name` and - `Mcp-Param-{Name}`), servers **MUST** decode encoded values (see - [Value Encoding](#value-encoding)) before comparing them to the body value. -* A header value contains invalid characters. - - - Intermediaries **MUST** return an appropriate HTTP error status (e.g., - `400 Bad Request`) for validation failures but are not required to return - a JSON-RPC error response. - - - - Intermediaries that enforce policy based on mirrored headers (e.g., routing - or rate-limiting by tenant) **SHOULD** verify that the `MCP-Protocol-Version` - header indicates a version that requires header–body validation. If the - version is older or the header is absent, the intermediary **SHOULD** reject - the request rather than trusting unvalidated header values. - - -## Backward Compatibility - -A client that supports both modern (per-request-metadata) MCP versions and a -legacy version that requires an `initialize` handshake **MAY** detect which -era the server implements by attempting a modern request first. On -`400 Bad Request`, the client **SHOULD** inspect the response body before -falling back: modern servers also use `400` for -[`UnsupportedProtocolVersionError`][unsupported-version], -`MissingRequiredClientCapabilityError`, and header-validation failures. - -* If the body contains a recognized modern JSON-RPC error, the server speaks - a modern version of MCP — retry using the advertised `supported` versions - or correct the request, rather than falling back. -* If the body is empty or is not a recognized modern JSON-RPC error, fall - back to `initialize` and continue with the legacy version for subsequent - requests. - -See [Versioning: Backward Compatibility][lifecycle-compat] for the era model -and a compatibility matrix for implementors. - -### Earlier Streamable HTTP Revisions - -Protocol versions `2025-03-26` through [`2025-11-25`](/specification/2025-11-25/basic/transports) -also used the Streamable HTTP transport, but in a different shape: servers could assign a session via -the `Mcp-Session-Id` header (terminated with HTTP DELETE), clients could open -a standalone SSE stream with HTTP GET to receive server-initiated messages, -servers could send JSON-RPC *requests* on SSE streams, and streams were -resumable via `Last-Event-ID`. None of these mechanisms are part of this -revision. - -A server that supports only this revision and receives such traffic from an -older client **SHOULD** respond as follows: - -* HTTP GET or DELETE to the MCP endpoint: respond with - `405 Method Not Allowed`. -* An `Mcp-Session-Id` header on a request: ignore it, and do not mint or echo - session IDs. -* A `Last-Event-ID` header: ignore it; streams are not resumable. - -Servers and clients that need to interoperate with counterparts speaking -those protocol versions implement the behavior described in the corresponding -revision (for example, -[2025-11-25: Streamable HTTP](/specification/2025-11-25/basic/transports#streamable-http)), -in addition to the version-negotiation fallback described above. - -### HTTP+SSE Transport (2024-11-05) - - - **Deprecated**: The [HTTP+SSE transport][http-sse] from protocol version - 2024-11-05 has been deprecated since protocol version `2025-03-26` and is - classified as Deprecated under the [feature lifecycle - policy](/community/feature-lifecycle#deprecating-a-feature) - ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)). - New implementations **SHOULD NOT** adopt it; existing implementations - **SHOULD** migrate to [Streamable - HTTP](/specification/2026-07-28/basic/transports/streamable-http). It is - eligible for removal in a future revision; see the [deprecated features - registry](/specification/2026-07-28/deprecated). - - -Clients and servers can maintain backward compatibility with the -deprecated [HTTP+SSE transport][http-sse] (from -protocol version 2024-11-05) as follows: - -**Servers** wanting to support older clients should: - -* Continue to host both the SSE and POST endpoints of the old transport, - alongside the new "MCP endpoint" defined for the Streamable HTTP transport. - * It is also possible to combine the old POST endpoint and the new MCP - endpoint, but this may introduce unneeded complexity. - -**Clients** wanting to support older servers should: - -1. Accept an MCP server URL from the user, which may point to either a server - using the old transport or the new transport. -2. Attempt to POST a request to the server URL, with an `Accept` header as - defined above: - * If it succeeds, the client can assume this is a server supporting the - new Streamable HTTP transport. - * If it fails with HTTP status code `400 Bad Request`, `404 Not Found`, - or `405 Method Not Allowed` **and** the response body is not a - recognized modern JSON-RPC error (a modern server returns one for - unsupported version, unknown method, or header-validation failure): - * Issue a GET request to the server URL, expecting that this will open - an SSE stream and return an `endpoint` event as the first event. - * When the `endpoint` event arrives, the client can assume this is a - server running the old HTTP+SSE transport, and should use that - transport for all subsequent communication. - -[lifecycle-compat]: /specification/2026-07-28/basic/versioning#backward-compatibility-with-initialization-based-versions diff --git a/slices/003-release-0-3-1/FINDINGS.md b/slices/003-release-0-3-1/FINDINGS.md deleted file mode 100644 index 2f3d0287..00000000 --- a/slices/003-release-0-3-1/FINDINGS.md +++ /dev/null @@ -1,338 +0,0 @@ - - -# Slice 003 — findings - -Written as each round closes, not at the end. `CONVENTIONS.md`: *"A report owed only at the end -is a report a crash deletes."* The session doing this work was killed mid-run once already. - -## The closing rule, stated before round 1 opened - -**Three rounds maximum. Two lanes per round. Every lane writes both artefacts, every round.** - - slices/003-release-0-3-1/logs/round..md the verdict - slices/003-release-0-3-1/logs/round..tree the tree the verdict was read against - -Neither is optional and neither is ceremony. Measured gaps in shipped slices: `001b-ping-guard` -has 16 verdicts and **zero** tree pins, so no verdict there is bound to the tree it was written -against; `002-streamable-http` round 4 has three tree pins and **one** verdict. This slice does -not add a third instance. - -**A round closes when both its lanes have written both artefacts and every blocking finding is -either fixed with a red demonstrated before the fix, or recorded below under "Open, recorded -rather than fixed" with the argument for why.** A survivor recorded as a survivor is correct; a -test asserting an implementation detail so a table can read all-killed is worse than the -survivor, because it looks like evidence. - -**The slice ships when a round closes with no blocking finding outstanding, and no later than -round 3.** If a blocking finding is still open after round 3, the affected change does not ship -and the reason is written here rather than argued away. - -### How the lanes were actually run, stated plainly - -This slice was worked by a single agent instructed not to spawn further agents. **The two lanes -per round are therefore two independent passes by the same reader, not two readers.** They are -scoped differently and each runs against a pinned tree and writes its own verdict, but they do -not have the independence the separate lanes in slice 002 had. Saying so is the point: a record -should not imply an independence it does not have. Where a lane's independence would have -mattered, the verdict says so. - - lane a correctness and anchors. Scores every anchor by mutation rather than reading a - test and agreeing with it. Reads lib/ and test/ as a pair. - lane b the shipped artefact as a consumer meets it, and the record. README, CHANGELOG, - mix.exs, HANDOFF, the slice's own logs and counts. Re-derives every population - claim with the command the record says produced it. - -## Round-by-round - -| round | lane | tree | blocking | filed | verdict | -|---|---|---|---|---|---| -| 1 | a | `1d27f1a` | 1 (A1) | 2 (A2, A3) | changes required, made | -| 1 | b | `1d27f1a` | 2 (B1, B2) | 1 (B3) | changes required, made | -| 2 | a | `bae1fca` | — | — | no changes required | -| 2 | b | `bae1fca` | 3 (B4, B5, B6) | — | changes required, made | -| 3 | a | `c504d36` | 1 (C1) | — | changes required, made | -| 3 | b | `c504d36` | 1 (C2) | — | changes required, made | - -### Round 1 — three record defects in code that behaves correctly - -Both lanes read commit `b821818`, tree `1d27f1a`. **No lane found a defect in what the code -does.** All three blocking findings were claims *about* the code that were false: - -**A1 — a justification nobody had measured.** `tool_annotations/2`'s comment said -`check_annotations/2` moved inside `host_call/1` because a non-string `properties` key raises in -`Enum.join/2` there. The mutant that leaves it outside SURVIVES (`mutation-c-Mc2.txt`, 156 tests, -0 failures), and the reason it survives shows the sentence is wrong: the path is only reached on -a type offence or a name collision, so such a key alone raises nothing. The move is kept and is -now described as defensive, with the survivor recorded below. - -**B1 — an off-by-one in the population, in the commit that fixed a population defect.** Three -places said six pre-read refusal sites and then named a seventh. Re-derived, there are seven: -`read_body_bounded/1`'s 413 and 400 are both in the set, and the 413 is the one that already -closed. The behaviour was right in all seven; the sentence was wrong in three files. - -**B2 — the published derivation stopped working on the tree it describes.** The quoted -`grep '<- read_body_bounded'` returns nothing after the fix, because the fix moved that call out -of the `with` clause list. A derivation that cannot see the boundary it defines is not one. It is -replaced by `grep -n 'defp before_body' -A 10`, which shows the steps and the read, re-run and -quoted in `round1.b.md`. - -**The pattern slice 002 recorded — the failure moving one level away from the code each round — -held on the first round of this slice.** The code was sound. Every blocker was a record. - -Gate at round 1 close: `logs/gate-round1.txt`, all eight step lines `pass`, `GATE_EXIT=0`. - -### Round 2 — the release commit, and the record moved again - -Both lanes read `8c296d8`, tree `bae1fca`: the release commit, with `mix.exs` at `0.3.1`, the two -new README claims and their tests, the `[0.3.1]` changelog section and the rewritten handoff. - -**Lane a required no changes.** It existed to answer one question -- whether a README-claim test -is an anchor or a quotation with an assertion stapled to it -- and answered it by mutation rather -than by reading: - - Mr1 @annotatable_types widened to admit number/object/array (the (a) defect restored) - KILLED 158 tests, 4 failures logs/mutation-r-Mr1.txt - Mr2 uniqueness grouped by the original name, not the case-folded one (the (b) defect - restored in the shape that looks most like a tidy-up) - KILLED 158 tests, 3 failures logs/mutation-r-Mr2.txt - -`Mr1`'s four kills include the new README-claim test itself, so the claim is anchored by -behaviour and not only by its own quotation. - -**Lane b found three, all in the record and all in the same direction: a document claiming a -little more than had happened.** - -**B4 — a claim of review that had not happened.** `HANDOFF.md` opened with "Two review rounds -complete at the time this was written". One was. The second was the round that found the -sentence. This is the class `CONVENTIONS.md` names as the worst member of its family, in the file -a reader trusts for exactly that number. Fixed by deleting the summary rather than correcting it: -the round table below is written as each round closes and is now named as the answer, so there is -one place that can be right instead of two that can disagree. - -**B5 — the changelog cited slice records without saying they do not ship.** `CHANGELOG.md` is in -`files:` and is an ex_doc extra, so `slices/003-release-0-3-1/…` resolves to nothing where it is -read. Commit `a01e68d` fixed this for the previous release and set the form; the new section used -the path and dropped the statement. Fixed once for the section. - -**B6 — a quoted table was abridged.** The changelog showed three of the measurement's six -columns. The numbers were right and the abridgement dropped exactly the columns that do not bear -on this release, which is the flattering direction. `CONVENTIONS.md`'s derivation for the -verbatim-archive rule is eight hand-copied verdicts of which four were abridged; this is that -shape at small scale, in the file a consumer reads. Fixed to the whole row. - -**Two rounds, five blocking findings, none of them in `lib/`.** Round 1: a justification nobody -measured, an off-by-one in a derived population, a derivation command that no longer worked. -Round 2: a review claimed that had not happened, an unresolvable path, an abridged quotation. -The code was sound in both rounds. That is slice 002's pattern -- the failure moving one level -away from the code -- arriving at the record and staying there. - -Gate at round 2 close: `logs/gate-round2.txt`, all eight step lines `pass`, `GATE_EXIT=0`. - -### Round 3 — a flake made a survivor score as killed - -Both lanes read `11e0b7a`, tree `c504d36`. Round 3's job was the one slice 002 round 7 named: -every mutant in this slice had been scored in the round that produced it, at 147, 156 or 158 -tests, and a count belonging to a smaller tree is a label rather than a measurement. So the whole -set was re-run on the final tree. - -**C1, lane a — and it is the sharpest finding of the three rounds.** The first re-score scored -`Mc2` as **KILLED**. `Mc2` is a **SURVIVOR**. The failure was not the mutant: it was the Bandit -harness's 9 MB case failing on an empty receive buffer, because `drain/2` used one 700 ms window -for every read and the upload had not finished inside it under the load of the scoring loop -itself. - -`CONVENTIONS.md` says a test written so the table reads all-killed is worse than the survivor, -because it looks like evidence. **A flaky harness produces that same false table with nobody -writing a dishonest test.** The number simply reads better than the truth, in the direction -nobody checks. Had the set not been run twice, this slice's record would have claimed a pinned -check that is not pinned — which is the exact failure the record exists to prevent, arriving by -a route no rule in `CONVENTIONS.md` currently names. - -Fixed in the harness rather than by deleting the test: a generous first-byte timeout -(`@first_byte_ms 10_000`), bounded by how long the client takes to finish writing, then the short -quiet window (`@quiet_ms 700`) that distinguishes "still holding the connection" from "done". -Demonstrated stable rather than declared fixed: ten consecutive runs of the Bandit file, all -`9 tests, 0 failures` (`logs/flake-check-bandit.txt`), and the full mutation set run twice -end to end. - -**The table, on the tree that ships, twice** (`logs/mutation-round3.txt`, with each mutant's diff -against the pristine file in its own log): - - mutant applied pass 1 pass 2 - M13rev 1 158 tests, 1 failure 158 tests, 1 failure - M2always 1 158 tests, 1 failure 158 tests, 1 failure - M2never 1 158 tests, 0 failures 158 tests, 0 failures - Mc2 1 158 tests, 0 failures 158 tests, 0 failures - Mc3 1 158 tests, 2 failures 158 tests, 2 failures - Md1 1 158 tests, 9 failures 158 tests, 9 failures - Md2 1 158 tests, 2 failures 158 tests, 2 failures - Mr1 1 158 tests, 4 failures 158 tests, 4 failures - Mr2 1 158 tests, 3 failures 158 tests, 3 failures - -`Md1` and `Md2` each gained a failure against their round-1 scores. The extra in both is the -release commit's new README-claim test, which is the README rule working: a claim added in one -commit is pinned by a test that dies with the behaviour. - -**C2, lane b.** Two comments written by this slice carried counts from the tree they were written -on — `tool_annotations/2`'s "156 tests, 0 failures" and the deleted-stand-in block's "147". Every -verdict in them still held; only the numbers were false, which is the version of this defect that -is hard to see. Both now cite the round-3 table and quote 158. The round-1 verdict and the (c) -and (d) commit messages keep their original counts, because a round's record is a record of what -that round measured and backfilling it would break the rule the correction exists to serve. - -Gate at round 3 close: `logs/gate-round3.txt`, all eight step lines `pass`, `GATE_EXIT=0`. - -### The three rounds, in one line - -Seven blocking findings, **none of them in what the code does**: a justification nobody measured, -an off-by-one in a derived population, a derivation command that stopped working, a review -claimed that had not happened, an unresolvable path, an abridged quotation, and a flake that made -a survivor read as killed. Slice 002 recorded the failure moving one level away from the code -each round. In this slice it started at the record and stayed there. - -## Open, recorded rather than fixed - -**1. `check_annotations/2` inside `host_call/1` is unpinned, and deliberately so.** `Mc2` -- -the spec read and schema walk inside, the validity check outside -- survives at **158 tests, 0 -failures, twice, on the tree that ships** (`logs/mutation-round3.txt`; the round-1 score of -156/0 in `logs/mutation-c-Mc2.txt` was against the smaller tree of that round, and the first -re-score read it as killed on a harness flake -- see round 3). Reaching a difference needs a `properties` map whose KEY -has no `String.Chars` implementation *and* a type offence or a name collision, so that -`annotation_detail/1` interpolates it. No JSON-derived schema can produce that. Pinning it would -mean a test constructing a schema no host can write, which is an implementation detail wearing a -test's clothes. Recorded as a survivor with the argument, per `CONVENTIONS.md`. - -**2. `fault_response/4`'s re-raise branch is still unpinned.** `M2never` survives at 158 tests, -0 failures, twice, on the tree that ships (`logs/mutation-round3.txt`), unchanged by this slice and scoped out of it by the -owner. Detecting it needs a non-500 `:plug_status` exception from code that is not the host's -- -the adapter's read path alone. This slice stands up the Bandit-backed instrument that could -close it (`test/beam_mcp/transport/http_bandit_test.exs`) and does not use it for this, because -the scope says not to. That is the whole remaining work: an existing instrument, an excluded -task. - -**3. Invalid UTF-8 in `MCP-Protocol-Version` turns a caller's own 400 into a 500.** Measured: -the bytes are echoed into the refusal's `data.requested`, so `Jason.encode!` raises -`Jason.EncodeError` inside `send_json/3` in `handle/2`'s `else` -- outside every inner rescue -- -and the caller gets a 500 with an error-level stacktrace in the host's log per request, on a path -`authorize/1` may leave unauthenticated. `Plug.Exception.status(%Jason.EncodeError{}) == 500`, so -it lands on `fault_response/4`'s answer branch and is answered inside the envelope; nothing leaks -and nothing crashes. Not fixed here: one commit does one thing, and this is a third defect in a -slice scoped to two. - -It is also, today, **the only path in the suite that reaches `fault_response/4`'s answer -branch**, which is why the anchor for that branch sits on it. The test says so in terms and says -that when the reflection is fixed the anchor must be replaced rather than deleted. Recording a -defect as a defect while using it as an anchor is uncomfortable and is the honest option: the -alternative was leaving the branch unpinned, which is what `M2always` -- a bodyless 500 -- would -then have walked through. - -**4. `read_body_bounded/1`'s `{:error, reason}` 400 has no test.** Derived: -`grep -rn "Could not read request body" test/ lib/` returns one hit, the source line. -Pre-existing, and now carrying the new close behaviour untested with it. `Plug.Test`'s -`read_body/2` is a `:binary.part` and cannot return `{:error, _}`; Bandit raises rather than -returning it for the malformed framings tried here. - -**5. A bodyless non-POST now costs a connection.** `GET /mcp` leaves nothing unread, so closing -on it buys nothing and costs a handshake. Deciding per request whether the body was consumed -would reintroduce the per-site reasoning that left six of seven sites unfixed. The trade is -uniformity at the split against one connection per rejected non-POST, and it is taken -deliberately. - -**6. A correction to slice 002's record, appended here rather than made there.** Lane s3 -recorded `second-request-answered=False` for a pre-read refusal. On bandit 1.12.5 / -thousand_island 1.5.0 that does not reproduce at ordinary body sizes: `ensure_completed/1` -drains the body and the second pipelined request IS answered -(`logs/probe-d-bandit-drain.txt`, three sizes to 1 MB, all `responses=2`). The defect is real -- -above the adapter's 8_000_000-byte drain cap the connection is dropped with nothing said, and -below it the server reads megabytes for a caller it refused -- but the symptom named for it is -not the one this adapter shows. - -**7. The Bandit harness's timing is a property of the machine, not of the code.** `drain/2` now -waits up to 10 s for a first byte and 700 ms of quiet after that. Those are generous on this -machine and were flaky at 700 ms flat under load; a slower machine or a busier CI runner could -find a new edge. The failure mode is a false red on the 9 MB case rather than a false green, -which is the safe direction, but it is a timing dependency in a suite that otherwise has none -and it is written down rather than left to be rediscovered. - -## Defect (e) — the third HTTP defect, found by this slice's review and fixed in it - -Reported by round 3 as open and not fixed. The owner's call, 2026-09-07: *"It is unauthenticated -and attacker-reachable, it is the same class as the four already in 0.3.1, and tagging without it -ships a known 500 path."* Fixed here rather than filed. - -**The defect.** Invalid UTF-8 in `MCP-Protocol-Version` was echoed into the refusal's -`data.requested`. `Jason.encode!` then raised `Jason.EncodeError` inside `send_json/3`, outside -every inner rescue; `call/2`'s rescue answered it through `fault_response/4`'s answer branch, so -the caller's own `400` came back as a `500` and the host's log took an error-level stacktrace. No -credential is required to send a header. - -**Red, before the fix** (`logs/red-e-invalid-utf8.txt`): - - 1) test a header value that is not valid UTF-8 is refused, not reflected - invalid UTF-8 in MCP-Protocol-Version is a 400 that reflects nothing - code: assert conn.status == 400 - left: 500 - right: 400 - 92 tests, 1 failure - TEST_EXIT=2 - -**The population, derived rather than listed.** The fix is not at the echo site. Command: - - $ grep -nE '"(requested|received|name|value|detail)" =>|header_error\(|param_error\(' \ - lib/beam_mcp/transport/http.ex - -One site embeds **caller**-controlled bytes: `"requested" => unsupported`, the raw header values. -Every other site interpolates a compile-time header NAME or a host-authored schema property. All -six header reads route through `header_values/2`, so that is where the class is closed. `Origin`, -`Mcp-Method`, `Mcp-Name` and every `Mcp-Param-{Name}` inherit the refusal, and a read added later -inherits it too. - -**Measured, not assumed, while choosing the fix:** - -- `String.downcase/1` does **not** raise on invalid UTF-8 — it passes the bytes through. Only - `Jason.encode!` raises, and `Plug.Exception.status(%Jason.EncodeError{}) == 500`. -- The Base64 sentinel is **not** a bypass. `decode_header_value/2` uses `Base.decode64/1`, the - non-raising variant, and a decoded value is used only for comparison in `all_match?/3` — it is - never echoed into a payload. A decoded value that is invalid UTF-8 fails the comparison and is - refused as an ordinary mismatch. Recorded because the validity check runs on the raw value and - a reader will ask. - -**Green:** `160 tests, 0 failures`, `TEST_EXIT=0` (`logs/green-e-invalid-utf8.txt`). Gate green, -every step line reading pass. - -### The anchor was replaced, not deleted - -Round 3's test comment said in terms that when this reflection was fixed, the anchor on -`fault_response/4`'s **answer branch** must be *replaced rather than deleted*, because that test -was the branch's only cover. Fixing the defect removed its input, and the test failed exactly as -predicted — `left: 400, right: 500`. - -The replacement reaches the same branch through the **host's** bytes instead of the caller's: a -host declaring `x-mcp-header` with invalid UTF-8 makes `param_error/3` interpolate it into a -refusal message, and `Jason.encode!` raises inside `send_json/3` — transport machinery, no -`:plug_status`. **On that input `500` is the correct answer**, so the new anchor pins the branch -without also recording a defect, which the old one did. - -## Open, recorded rather than fixed — appended - -**A host `x-mcp-header` annotation name that is not valid UTF-8 makes its tool uncallable.** It is -advertised by `tools/list` and every call is answered `500`. This is the host's bug and the `500` -is correct, and it is now the input the answer-branch anchor uses. Refusing such a schema at -`check_annotations/2` — beside the non-primitive and collision checks, which is where it belongs — -was not done here: it needs its own red and its own round, and this slice has no round left. - -**The mutation harness reports an extra failure under sustained load.** Across 40 back-to-back -suite runs producing `logs/mutation-rebased.txt`, two runs read one failure more than the mutant -deserves — `M13rev` read 2 (record: 1) and `Mr2` read 4 (record: 3). Neither changed a verdict. -Measured in isolation, each is stable and matches the record exactly: `Mr2` 3/3/3/3/3/3 over six -runs, `M13rev` 1/1/1/1/1 over five, and the unmutated baseline 0/0/0/0/0/0 over six — **the -shipping tree is clean.** The artefact is induced by the driver, almost certainly the -Bandit-backed timing test under load, which is the same component whose 700 ms window produced -round 3's false KILLED. It matters because a flake that ADDS a failure is the one that makes a -SURVIVOR read as KILLED: `M2never` and `Mc2` are the rows it could corrupt. Neither was observed -corrupted in any run here, and *not observed* is weaker than *cannot happen*. Closing it means a -harness that runs each mutant in isolation with a quiet machine, or a Bandit test that does not -depend on wall-clock windows; both need their own round. diff --git a/slices/003-release-0-3-1/PLAN.md b/slices/003-release-0-3-1/PLAN.md deleted file mode 100644 index cf35331f..00000000 --- a/slices/003-release-0-3-1/PLAN.md +++ /dev/null @@ -1,290 +0,0 @@ - - -# Slice 003 — the three live 002 review findings, released as 0.3.1 - -**Written before any shipping code.** Release **0.3.1**, heading left `unreleased` — dating it is -the owner's step at tag time. Base `origin/main` at `31bcbff` (published `0.3.0`, tagged -`v0.3.0`). Worktree `/home/aylac/Projects/beam_mcp-wt/003-release-0-3-1`, branch -`slice/003-release-0-3-1`, its own `_build` and `deps`. - -**Baseline measured before planning**, so every count below is a delta from a known tree: - - $ ./tools/gate.sh - == beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass - Gate OK. - - $ mix test - 138 tests, 0 failures - TEST_EXIT=0 - -Archived: `logs/gate-baseline.txt`, `logs/baseline-tests.txt`. - -## 0. The original queue, verified independently — four items were already shipped - -The coordinator's board queue named five items and measured four as satisfied. **I verified all -five myself against this worktree before accepting that.** I agree with the coordinator on every -one. Recorded here because "already done" is a claim like any other and the next reader should be -able to re-run it rather than trust it. - -| item | claim | what I measured | verdict | -|---|---|---|---| -| SCR-269 | `CHANGELOG.md` in `mix.exs` `files:` | `mix.exs:53` — `files: ~w(lib mix.exs README.md CHANGELOG.md LICENSE NOTICE LICENSES)`. Also **pinned**, not merely present: `readme_claims_test.exs:95-105` asserts `"CHANGELOG.md" in Mix.Project.config()[:package][:files]`, and `:399` asserts it again beside the `refute "CONVENTIONS.md" in files`. | shipped | -| SCR-266 | README requirement excludes the next break | `README.md:17` — `[{:beam_mcp, "~> 0.3.0"}]`. **And the owner's policy answer is already recorded as a pinned rule rather than as a correct string**, which was the coordinator's open question: `readme_claims_test.exs:129-149` derives `next_break = "#{major}.#{minor + 1}.0"` from `Mix.Project.config()[:version]` and refutes it, guarded on `major == 0` with a real `else` branch that moves the break to the major at `1.x`; `:174-216` then re-derives **every** requirement string the README offers by regex over the prose and holds each to the same policy. There is nothing left to record. | shipped, policy already pinned | -| SCR-271 | `Transport.Stdio` is `@moduledoc false` | `lib/beam_mcp/transport/stdio.ex:5-27` carries a 23-line `@moduledoc` documenting framing, the `Content-Length` read, the privilege argument and a worked `run/1` example. The gate's `docs` step passes with 0 warnings, so it is not hidden either. | shipped | -| SCR-261 | `ttlMs`/`cacheScope` on `tools/list` | `lib/beam_mcp/server.ex:194-195` emits both; `:92-93` takes them as host options defaulting to the non-permissive `0` / `"private"`. `http_test.exs:471-481` pins both the defaults and host-supplied values. | shipped | -| SCR-275 | colliding `x-mcp-header` names | `http.ex:533` `Map.put(acc, String.downcase(name), …)` and `:541` `Map.merge(acc, annotations(...))` are both still there. | **open** — now item (b) below | - -**Two things I found while verifying that are NOT in this slice and are reported rather than -fixed**, since items 1-5 above are the coordinator's to close: - -1. **The both-eras emission of `ttlMs`/`cacheScope` is deliberate, documented in a code comment - (`server.ex:187-190`), and unpinned.** `grep -rn 'ttlMs\|cacheScope\|tools_ttl_ms' test/` - returns five hits, all in `http_test.exs`, all on the modern-only HTTP path. I built the - mutant that makes the fields modern-only (the legacy `_meta` branch strips them after - `handle_message/2`) and reverted it before writing this plan; I did **not** score it, because - the re-ranking removed SCR-261 from my queue while the mutant was on disk. What I can state is - the derivation: no test constructs a `tools/list` at `2025-11-25` and asserts either field, so - nothing in the suite can distinguish the two designs. -2. **It is not a documentation defect.** I checked the three places that could make it one. - `README.md:24` says the fields are what `2026-07-28` *requires*, which is true and says nothing - about legacy. `CHANGELOG.md:86-88` says the same. The README's era table (`:255-261`) is a table - of *differences* between the eras, and a field present at both is not a difference, so its - absence from the table is correct rather than misleading. **No sentence in either file is - false.** The gap is an unpinned deliberate behaviour, not a wrong claim, and it belongs on the - board rather than in a patch release. - -**The slice is therefore smaller than the board suggested, and I say so plainly**: of the five -original items, one was open. - -## 1. What this slice is, after the re-ranking - -Four defects, all in `lib/beam_mcp/transport/http.ex`, all found by the 002 review lanes and all -filed rather than fixed at the time. Ordered as the owner ranked them. - -## 2. (a) and (b) — the owner's explicit question, answered - -> *"Your PLAN must state which of (a) and (b) you fix first, and whether they share a fix."* - -**They share a fix, and (a) goes first.** - -They are the same defect wearing two schemas. In both, a host writes an `x-mcp-header` annotation -that the `2026-07-28` transport specification forbids; in both, this transport accepts the invalid -definition **silently**, advertises the annotation to clients through `tools/list`, and then -produces a wrong runtime outcome that names the wrong party. The two forbidden shapes are two -MUSTs the module already quotes in its own comments: - - "x-mcp-header MUST only be applied to parameters with primitive types - (integer, string, boolean)" -- quoted at http.ex:439-441 - "x-mcp-header values MUST be case-insensitively unique" - -- quoted at http.ex:596-598 - -Both quotes sit beside code that assumes the MUST holds and does not check it. That is one -mechanism missing, not two: - -- **(a)** `value_matches?/2`'s catch-all (`http.ex:443`) returns `false` for a map, a list or a - float, so an annotated non-primitive can never match. Both branches of `check_each_param/4` - close: omit the header and it is *"required: the body carries a value to mirror"*; send one and - it *"does not match the corresponding request body value"*. The tool is permanently uncallable - and **the `400` blames the caller for the host's schema**. -- **(b)** `annotations/2` accumulates into a map keyed by `String.downcase(name)` - (`http.ex:602-616`), so `Dup` and `DUP` collapse to one entry — `Map.put` loses the sibling and - `Map.merge(acc, annotations(subschema, …))` lets a nested annotation overwrite an outer one. - One annotated property is then **never checked at all**, and which one survives depends on map - iteration order. - -**The shared fix.** The annotation set is derived from the tool's `inputSchema` — the authority, -per `CONVENTIONS.md`'s *"deriving from attacker-controlled input is not deriving a population"* — -and that same derivation is where its validity is decided. An annotation set that violates either -MUST is a **host fault**, answered exactly as this module already answers a host catalog that -raises: `500`, `-32603` `Internal error`, with the diagnosis in `Logger.error` naming the tool and -the offending annotation. No detail reaches the caller. - -Two consequences, both deliberate: - -- **The caller stops being blamed for the host's bug.** (a)'s `400` becomes a `500`, which is the - honest status: the request was well-formed and the server is misconfigured. -- **(b) stops failing open.** An unenforceable annotation set refuses rather than silently - enforcing a subset of what `tools/list` advertised. - -**Why not at `init/1`, which is what lane s1 proposed for both.** I measured the cost and it is -not acceptable. `init/1` cannot enumerate the catalog, because `Plug.Router.forward/2` — the -mounting form this package's own README documents at `README.md:121-139` — calls the target plug's -`init/1` **at the host's compile time**, so `catalog.all()` would run during the host's build, -before its application, its config and anything the catalog reads are started. That is the same -family as round 3's finding that `Code.ensure_loaded?` in `init/1` rejected a valid catalog living -in the host's own project: `init/1` runs somewhere the host's world does not exist yet. Deriving -at the point of use costs one map walk per `tools/call` on a schema this module already walks. - -**Order, and why it is not arbitrary.** (a) is ranked higher by the owner and it is also the one -that needs the plumbing: it introduces the "an invalid annotation set is a host fault" path -through `mirrored_params/2`. (b) is then one predicate on the set that path already derives. Two -commits, each with its own red, because they answer two different MUSTs and a reader auditing -either should find one commit. - -**Scope limit, stated rather than discovered later.** (a) refuses an annotation whose subschema -**declares** a non-primitive `"type"`. A property with no declared `"type"` cannot be judged from -the schema, so it is left alone and keeps today's behaviour. Refusing it would be judging the host -on the caller's value, which is the wrong side of the boundary and would turn a caller sending a -wrong-typed value into a host fault. The residual gap is recorded, not closed. - -## 3. (c) — the lost request id, and the anchor it costs - -**The defect, measured, not reasoned.** `slices/002-streamable-http/logs/probe-fault-ids.txt` -already carries the table: - - host tool raises (dispatch/3) 500 -32603 id=4242 - host tool_catalog RAISES (header validation) 500 -32603 id=4242 - host tool_catalog returns a malformed spec 500 -32603 id=nil - host authorize/1 raises 500 -32603 id=nil - -Row 3 is the defect: `mirrored_params/2` calls `ToolCatalog.fetch/2` **inside** `host_call/1` and -then reads `spec.input_schema` and walks it **outside**, in the `with` body (`http.ex:582-583`). -A host catalog that *raises* keeps the id; the same host catalog returning *malformed data* — a -plain map where a `%ToolSpec{}` was promised — raises `KeyError` one line later, escapes to -`call/2`'s outer rescue, and answers `id: null`. One host bug, two envelopes, decided by which -line it lands on. Row 4 is **not** a defect and is not touched: `authorize/1` runs before the body -is read, so there is genuinely no id to echo. - -**The fix** is M13 from `logs/mutation-round7.txt`, applied as a fix rather than scored as a -mutant: the spec read and the annotation walk move inside `host_call/1`. - -**M13 is its own red, and this is the part that needs saying.** The reason M13 exists as a mutant -is that `http_test.exs:1160-1191` — *"an exception with no status of its own, raised outside -host_call/1, keeps the envelope"* — **asserts `body!(conn)["id"] == nil`**, and its own comment -says in terms that moving this read inside `host_call/1` would reroute the test and silently -disarm the mutant it exists to kill. So the red for (c) is that assertion inverting: the test -that today demands `id == nil` is the test that must demand `id == 4242`. - -**And that anchor is load-bearing for something else, which I am not going to lose quietly.** -`fault_response/4` is reached from exactly one place — `call/2`'s rescue (`http.ex:199`); -`dispatch/3`'s rescue goes to `host_fault/5` instead (`http.ex:734-737`). The `BadSpecCatalog` -test is therefore the **only** thing in the suite that reaches `fault_response/4`'s answer branch, -and (c) removes the path it uses. Fixing (c) without replacing it would leave the always-re-raise -mutant — which serves a bodyless `500`, the exact failure this module exists to avoid — unpinned, -which is round 5's failure shape exactly. - -So (c) is **two things in one commit and they cannot be split**: move the read, and re-anchor -`fault_response/4`'s answer branch on a path that survives the move. I have one candidate and it -is a measurement, not a plan: invalid UTF-8 bytes in `MCP-Protocol-Version` are echoed back in the -refusal's `data.requested` (lane s1 named that reflection), and `Jason.encode!` on invalid UTF-8 -raises inside `send_json/3` in `handle/2`'s `else` — outside every inner rescue. **I will measure -whether that path is live before relying on it.** If it is, it is also a second finding — a caller -turning a `400` into a `500` — which I will report rather than fold in. If it is not, I will say -so and the commit will re-anchor by driving `call/2` with an opts map `init/1` did not build, -flagged to the review lanes as the weaker of the two. - -**If neither anchor survives review, (c) does not ship.** A fix that trades a real defect for an -unpinned branch is the trade this repository has spent three rounds learning not to make, and I -will report rather than take it unilaterally. - -## 4. (d) — pre-read refusals answer without `connection: close` - -Measured by round 6 lane s3 and recorded in `slices/002-streamable-http/FINDINGS.md`: - - ok authorize (baseline, 200) second-request-answered=True - authorize raises -> 500 second-request-answered=False - catalog raises (after read_body) -> 500 second-request-answered=True - -A refusal that fires before `read_body_bounded/1` answers on a conn with an unread body. Bandit -then drops the connection, and it drops it **without saying so** — no `Connection: close` — so a -client that pipelined a second request loses it silently instead of learning the connection ended. -`read_body_bounded/1`'s own `413` already calls `close_after/1` (`http.ex:331`); the three -refusals in front of it do not. - -**The population is derived structurally rather than listed**, per `CONVENTIONS.md`'s "every place -a mechanism reads the same kind of input is one mechanism". Today's set is the Origin `403`, the -`405`, and `authorize/1`'s `403`/`500`/contract-violation `403` — but naming five sites is how the -fourth header read got missed. Instead `handle/2` splits at the body read: everything refused -*before* it is answered through one `send_json(close_after(conn), …)`, so a step added in front of -`read_body_bounded/1` later inherits the behaviour without needing a new finding. - -**The red is Bandit-backed**, which this suite has never had and which two recorded gaps in -`slices/002-streamable-http/FINDINGS.md` say is the missing instrument. A real listener on a real -socket, one connection, two pipelined requests: today the refusal carries no `connection: close` -and the second request is never answered; after the fix the refusal says the connection is ending. -**What the fix does not do is get the second request answered** — it cannot, and I will not claim -it does. Reading the body of a caller we have already refused is worse than closing on them. -The control in the same test is an ordinary `200`, which must keep the connection and must answer -the second request, so the test can distinguish "closes correctly" from "closes always". - -## 5. Order, and one commit does one thing - - 1 (a) an x-mcp-header on a non-primitive property is a host fault red: a FLOAT annotation - 2 (b) colliding x-mcp-header names are a host fault red: Dup / DUP - 3 (c) the spec read and annotation walk move inside host_call/1 red: M13 / the malformed spec - 4 (d) a refusal before the body read signals connection: close red: Bandit-backed pipelining - 5 README and CHANGELOG for 1-4 every claim pinned - 6 0.3.1 in mix.exs, CHANGELOG [0.3.1] unreleased - -Each red is archived by the command that produced it — `… 2>&1 | tee logs/.txt` — before its -fix exists, per `CONVENTIONS.md`'s verbatim-archive rule. Commits 1-4 each carry their red output -in the message. `git commit -s` on every commit; no tool-attribution trailers. - -## 6. The README moves in this slice, because behaviour moves in it - -`CONVENTIONS.md` is explicit that the README moves with the behaviour and that every behavioural -claim in it is pinned in `test/beam_mcp/readme_claims_test.exs`. Three claims change: - -1. An `x-mcp-header` annotation the specification forbids is a **host** fault — `500`, logged, - with nothing about it in the response — not a `400` blaming the caller. (a) and (b). -2. A refusal issued before the body is read ends the connection and says so. (d). -3. A host catalog returning a malformed spec answers inside the envelope with the request's id. - (c) — CHANGELOG only unless a reviewer argues it is a README-level claim; it is a property of - the error envelope rather than of the interface a host wires. - -Each of 1 and 2 gets a test in `readme_claims_test.exs` that quotes the sentence **and** exercises -the behaviour, not a `claims/1` quote alone. A quote-only pin catches a sentence that moves and -misses a sentence that becomes false, which is the gap that file's own moduledoc records. - -## 7. Acceptance criteria - -1. Four reds demonstrated and archived by the command that produced them, before their fixes. -2. A host annotating a `number` property gets `500` and a log naming the tool; the caller's body - is not in the response. The same for an annotated `object` and an annotated `array`. -3. `Dup`/`DUP` on two properties gets `500` and a log; neither property is served unchecked. -4. A catalog returning `%{name: :echo}` answers `500` `-32603` **with the request's id**. -5. `fault_response/4`'s answer branch is still pinned after (c), demonstrated by mutation, or - (c) does not ship. -6. A pre-read refusal carries `connection: close` against a live Bandit listener; an ordinary - `200` on the same listener does not, and its pipelined second request is answered. -7. Every mutant in `logs/mutation.md` is asserted **applied** before it is scored, and a survivor - is recorded as a survivor with the argument for why. -8. `./tools/gate.sh` exits 0 with **every step line reading `pass`**, read as lines and not as an - exit code. -9. Version `0.3.1` in `mix.exs`; `## [0.3.1] — unreleased` in `CHANGELOG.md`; `0.3.0`'s section - not amended. -10. A PR against `main`, not merged, with every check's conclusion read from the jobs API. - -## 8. Out of scope, named so it is not folded in - -- The `fault_response/4` **re-raise** branch pin and `ToolCatalog.fetch/2`'s `@spec` honesty — - the owner excluded both. -- SCR-269, SCR-266, SCR-271, SCR-261 — verified shipped in §0, the coordinator's to close. -- The unpinned both-eras `ttlMs`/`cacheScope` emission (§0.1) — reported for the board. -- Anything under `tools/`, `.githooks/` or `.github/`. If a fix here wants a gate step I stop and - report rather than reaching into subagent "gate"'s files. - -## 9. Review - -Per `slices/002-streamable-http/PLAN.md` §6 and the owner's three-round cap: **two review lanes -plus a security lane**, scoped to the shipped artefact — `lib/`, `test/`, `README.md`, -`CHANGELOG.md`, `mix.exs`. Findings about slice records are filed, not blocking. Each lane records -the tree hash it read. I do not review my own diff and I do not commit on a changes-required -verdict. - -Lanes are briefed on the failure pattern `slices/002-streamable-http/FINDINGS.md` records rather -than on the diff alone: across seven rounds the failure moved one level away from the code each -time — defect, then test anchor, then record. **Lanes are told to score anchors by mutation and -not to read a test and agree with it**, and (c)'s anchor replacement is named to them as the -specific place this slice is most likely to reproduce that pattern. diff --git a/slices/003-release-0-3-1/logs/baseline-c-tests.txt b/slices/003-release-0-3-1/logs/baseline-c-tests.txt deleted file mode 100644 index 6bbb24f2..00000000 --- a/slices/003-release-0-3-1/logs/baseline-c-tests.txt +++ /dev/null @@ -1,207 +0,0 @@ -Running ExUnit with seed: 665826, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -19:08:12.031 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:08:12.035 [info] beam_mcp: refused by host authorize/1: :nope -............ -19:08:12.090 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -19:08:12.143 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -19:08:12.202 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:08:12.202 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:08:12.202 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:08:12.203 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:08:12.209 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:08:12.261 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -19:08:12.313 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:08:12.313 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:08:12.313 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:08:12.319 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:08:12.319 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:08:12.319 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:08:12.320 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -19:08:12.474 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -Finished in 1.8 seconds (0.8s async, 0.9s sync) -146 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/baseline-tests.txt b/slices/003-release-0-3-1/logs/baseline-tests.txt deleted file mode 100644 index 31626084..00000000 --- a/slices/003-release-0-3-1/logs/baseline-tests.txt +++ /dev/null @@ -1,207 +0,0 @@ -Running ExUnit with seed: 293384, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................................... -18:28:24.602 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -18:28:24.606 [info] beam_mcp: refused by host authorize/1: :nope -... -18:28:24.657 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:28:24.658 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -18:28:24.665 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:28:24.672 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -18:28:24.681 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:583: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:28:24.682 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:28:24.682 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:28:24.682 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:28:24.733 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:28:24.785 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:28:24.791 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -18:28:24.999 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -18:28:25.000 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -18:28:25.052 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -18:28:25.052 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -18:28:25.052 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -Finished in 1.7 seconds (0.7s async, 0.9s sync) -138 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/flake-check-bandit.txt b/slices/003-release-0-3-1/logs/flake-check-bandit.txt deleted file mode 100644 index 8f7036af..00000000 --- a/slices/003-release-0-3-1/logs/flake-check-bandit.txt +++ /dev/null @@ -1,11 +0,0 @@ -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -9 tests, 0 failures -LOOP_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-a.txt b/slices/003-release-0-3-1/logs/gate-a.txt deleted file mode 100644 index 45d759c4..00000000 --- a/slices/003-release-0-3-1/logs/gate-a.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-b.txt b/slices/003-release-0-3-1/logs/gate-b.txt deleted file mode 100644 index 45d759c4..00000000 --- a/slices/003-release-0-3-1/logs/gate-b.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-baseline.txt b/slices/003-release-0-3-1/logs/gate-baseline.txt deleted file mode 100644 index 2e77b919..00000000 --- a/slices/003-release-0-3-1/logs/gate-baseline.txt +++ /dev/null @@ -1,10 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. diff --git a/slices/003-release-0-3-1/logs/gate-c-baseline.txt b/slices/003-release-0-3-1/logs/gate-c-baseline.txt deleted file mode 100644 index 45d759c4..00000000 --- a/slices/003-release-0-3-1/logs/gate-c-baseline.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-c.txt b/slices/003-release-0-3-1/logs/gate-c.txt deleted file mode 100644 index 45d759c4..00000000 --- a/slices/003-release-0-3-1/logs/gate-c.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-d.txt b/slices/003-release-0-3-1/logs/gate-d.txt deleted file mode 100644 index 7d4e81b3..00000000 --- a/slices/003-release-0-3-1/logs/gate-d.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (25 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-rebased.txt b/slices/003-release-0-3-1/logs/gate-rebased.txt deleted file mode 100644 index 2c7db705..00000000 --- a/slices/003-release-0-3-1/logs/gate-rebased.txt +++ /dev/null @@ -1,10 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (233 tracked; 58 in scope, 56 headered + 2 sidecar; excluded 173 archive + 2 licence text) - licence files pass -Gate OK. diff --git a/slices/003-release-0-3-1/logs/gate-release.txt b/slices/003-release-0-3-1/logs/gate-release.txt deleted file mode 100644 index 7d4e81b3..00000000 --- a/slices/003-release-0-3-1/logs/gate-release.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (25 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-round1.txt b/slices/003-release-0-3-1/logs/gate-round1.txt deleted file mode 100644 index 7d4e81b3..00000000 --- a/slices/003-release-0-3-1/logs/gate-round1.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (25 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-round2.txt b/slices/003-release-0-3-1/logs/gate-round2.txt deleted file mode 100644 index 7d4e81b3..00000000 --- a/slices/003-release-0-3-1/logs/gate-round2.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (25 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/gate-round3.txt b/slices/003-release-0-3-1/logs/gate-round3.txt deleted file mode 100644 index 7d4e81b3..00000000 --- a/slices/003-release-0-3-1/logs/gate-round3.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (25 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/green-a-nonprimitive.txt b/slices/003-release-0-3-1/logs/green-a-nonprimitive.txt deleted file mode 100644 index 7adafe89..00000000 --- a/slices/003-release-0-3-1/logs/green-a-nonprimitive.txt +++ /dev/null @@ -1,207 +0,0 @@ -Running ExUnit with seed: 934615, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -18:37:51.247 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:37:51.251 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:37:51.251 [info] beam_mcp: refused by host authorize/1: :nope -.. -18:37:51.303 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -18:37:51.357 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -18:37:51.358 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:37:51.358 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:37:51.359 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -18:37:51.360 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:37:51.360 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:37:51.361 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:37:51.366 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -18:37:51.371 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:37:51.371 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -18:37:51.424 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -18:37:51.427 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -18:37:51.433 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................................. -18:37:51.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -Finished in 1.7 seconds (0.8s async, 0.9s sync) -142 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/green-b-collision.txt b/slices/003-release-0-3-1/logs/green-b-collision.txt deleted file mode 100644 index 9c948548..00000000 --- a/slices/003-release-0-3-1/logs/green-b-collision.txt +++ /dev/null @@ -1,207 +0,0 @@ -Running ExUnit with seed: 414995, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................................... -18:41:48.875 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -18:41:48.876 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:41:48.876 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -18:41:48.887 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:41:48.893 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:41:48.894 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -18:41:48.948 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:41:48.949 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:41:48.949 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -18:41:49.000 [info] beam_mcp: refused by host authorize/1: :nope -..................... -18:41:49.111 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:41:49.111 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -18:41:49.119 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -18:41:49.170 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -18:41:49.221 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -18:41:49.221 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -18:41:49.279 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -18:41:49.381 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -Finished in 1.9 seconds (0.9s async, 0.9s sync) -146 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/green-c-lost-id.txt b/slices/003-release-0-3-1/logs/green-c-lost-id.txt deleted file mode 100644 index 5b2a7516..00000000 --- a/slices/003-release-0-3-1/logs/green-c-lost-id.txt +++ /dev/null @@ -1,223 +0,0 @@ -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 267465, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................................... -19:12:26.977 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:12:26.983 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -19:12:26.984 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -19:12:27.035 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -19:12:27.037 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:951: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:869: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:12:27.037 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:951: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:869: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:12:27.047 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:981: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:12:27.099 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:12:27.100 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:12:27.100 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:12:27.152 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:951: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:869: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:12:27.162 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:630: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:12:27.163 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -19:12:27.275 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:630: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:12:27.285 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1276: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:951: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:869: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1277: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:12:27.300 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:631: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:12:27.301 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:951: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:869: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -19:12:27.363 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1287: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:951: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:869: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1290: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:12:27.363 [info] beam_mcp: refused by host authorize/1: :nope -.......... -Finished in 2.2 seconds (1.1s async, 1.1s sync) -147 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/green-d-connection-close.txt b/slices/003-release-0-3-1/logs/green-d-connection-close.txt deleted file mode 100644 index ece810fe..00000000 --- a/slices/003-release-0-3-1/logs/green-d-connection-close.txt +++ /dev/null @@ -1,250 +0,0 @@ -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 811966, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................................... -19:24:54.260 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:677: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:637: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:543: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:24:54.316 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:24:54.316 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:998: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:916: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:24:54.317 [info] beam_mcp: refused by host authorize/1: :nope -....... -19:24:54.471 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:998: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:916: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:24:54.478 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:678: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:637: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:543: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -19:24:54.536 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -19:24:54.588 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -19:24:54.591 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:24:54.643 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:998: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:916: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:24:54.650 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:677: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:637: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:543: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:24:54.650 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:998: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:916: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:24:54.652 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:1028: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:24:54.656 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:998: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:916: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:24:54.656 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:998: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:916: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:24:54.656 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:24:54.656 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:24:54.657 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -19:24:54.762 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -19:24:55.810 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:24:56.522 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:24:56.525 [info] beam_mcp: refused by host authorize/1: :nope -.... -19:24:57.240 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:249: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:971: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -156 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/green-e-invalid-utf8.txt b/slices/003-release-0-3-1/logs/green-e-invalid-utf8.txt deleted file mode 100644 index f35549a4..00000000 --- a/slices/003-release-0-3-1/logs/green-e-invalid-utf8.txt +++ /dev/null @@ -1,250 +0,0 @@ -Running ExUnit with seed: 146531, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -20:12:41.333 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -20:12:41.614 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -20:12:41.622 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -20:12:41.728 [info] beam_mcp: refused by host authorize/1: :nope -..... -20:12:41.781 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -20:12:41.787 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -20:12:41.845 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -20:12:41.848 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1078: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -20:12:41.850 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -20:12:41.902 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1048: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:966: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -20:12:42.006 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1048: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:966: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -20:12:42.007 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1048: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:966: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -20:12:42.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -20:12:42.059 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:12:42.059 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:12:42.060 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -20:12:42.060 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -20:12:42.060 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1048: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:966: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -20:12:42.066 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1048: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:966: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:12:42.067 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1048: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:966: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -20:12:43.845 [info] beam_mcp: refused by host authorize/1: :nope -. -20:12:43.902 [info] beam_mcp: refused by host authorize/1: :nope -. -20:12:43.906 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -20:12:43.922 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1021: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/green-readme-claims.txt b/slices/003-release-0-3-1/logs/green-readme-claims.txt deleted file mode 100644 index c84a14d8..00000000 --- a/slices/003-release-0-3-1/logs/green-readme-claims.txt +++ /dev/null @@ -1,8 +0,0 @@ -Running ExUnit with seed: 929469, max_cases: 64 - -........... -19:37:05.081 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -Finished in 0.1 seconds (0.1s async, 0.00s sync) -20 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/measure-version-requirement.txt b/slices/003-release-0-3-1/logs/measure-version-requirement.txt deleted file mode 100644 index fcce57d0..00000000 --- a/slices/003-release-0-3-1/logs/measure-version-requirement.txt +++ /dev/null @@ -1,11 +0,0 @@ -Elixir 1.19.2 - -requirement 0.1.0 0.2.0 0.3.0 0.3.1 0.4.0 1.0.0 -~> 0.1 true true true true true false -~> 0.2 false true true true true false -~> 0.3 false false true true true false -~> 0.3.0 false false true true false false -~> 0.3.1 false false false true false false - -mix.exs @version today: 0.3.0 -PROBE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/mutation-c-M13rev.txt b/slices/003-release-0-3-1/logs/mutation-c-M13rev.txt deleted file mode 100644 index e28797c4..00000000 --- a/slices/003-release-0-3-1/logs/mutation-c-M13rev.txt +++ /dev/null @@ -1,261 +0,0 @@ -M13rev applied -=== M13rev: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:12:45.756367803 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:13:28.596066451 -0400 -@@ -587,7 +587,9 @@ - defp mirrored_params(%{"method" => "tools/call"} = message, opts) do - with name when is_binary(name) <- param(message, "name"), - catalog when not is_nil(catalog) <- opts.server_opts[:tool_catalog], -- {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end) do -+ {:ok, spec} <- host_call(fn -> ToolCatalog.fetch(catalog, name) end), -+ entries = annotations(spec.input_schema), -+ :ok <- check_annotations(name, entries) do - entries - else - # A host catalog that RAISES is not a catalog with no such tool, and collapsing the two -@@ -626,13 +628,6 @@ - # `ToolCatalog.fetch/2` returning anything but `{:ok, spec}` still falls through this - # `with` unchanged, to the caller's `_ -> []`: a tool this catalog does not have mirrors - # no parameters, which is not a fault. -- defp tool_annotations(catalog, name) do -- with {:ok, spec} <- ToolCatalog.fetch(catalog, name), -- entries = annotations(spec.input_schema), -- :ok <- check_annotations(name, entries) do -- {:ok, entries} -- end -- end - - # ONE ENTRY PER ANNOTATED PROPERTY, and a list rather than a map keyed by the case-folded - # name. The key was the defect: `Map.put` dropped a sibling annotated with the same name in -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M13rev: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 69073, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -19:13:29.468 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -19:13:29.635 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:29.636 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:29.636 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:13:29.639 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:976: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:13:29.694 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -19:13:29.746 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:13:29.748 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:13:29.748 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1287: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1290: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:13:29.753 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:13:29.758 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:29.759 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:29.760 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1161 - Assertion with == failed - code: assert body!(conn)["id"] == 4242 - left: nil - right: 4242 - stacktrace: - test/beam_mcp/transport/http_test.exs:1191: (test) - -......... -19:13:29.767 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:13:29.827 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:13:29.827 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1276: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1277: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:13:29.879 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -19:13:29.931 [info] beam_mcp: refused by host authorize/1: :nope -. -19:13:29.982 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -Finished in 1.7 seconds (0.8s async, 0.8s sync) -147 tests, 1 failure -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-c-M2always.txt b/slices/003-release-0-3-1/logs/mutation-c-M2always.txt deleted file mode 100644 index b85923ee..00000000 --- a/slices/003-release-0-3-1/logs/mutation-c-M2always.txt +++ /dev/null @@ -1,247 +0,0 @@ -M2always applied -=== M2always: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:12:45.756367803 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:13:53.436775640 -0400 -@@ -246,13 +246,8 @@ - # :plug_status. It therefore holds for adapters other than Bandit and needs no reference to - # a module that may not be loaded. 500 means "carries no status of its own", which is the - # only case this transport should be answering for. -- defp fault_response(conn, exception, stacktrace, id) do -- if Plug.Exception.status(exception) == 500 do -- Logger.error(Exception.format(:error, exception, stacktrace)) -- send_json(conn, 500, error(id, -32_603, "Internal error")) -- else -- reraise exception, stacktrace -- end -+ defp fault_response(_conn, exception, stacktrace, _id) do -+ reraise exception, stacktrace - end - - defp crash_response(conn) do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M2always: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 947376, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................................... -19:13:54.343 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1287: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1290: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:13:54.358 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:625: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:585: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:530: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:491: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:13:54.362 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:13:54.362 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:13:54.366 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:625: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:585: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:530: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:491: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:13:54.469 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:298: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -19:13:54.478 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -19:13:54.478 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -19:13:54.530 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:13:54.637 [info] beam_mcp: refused by host authorize/1: :nope -.... -19:13:54.689 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:298: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:54.689 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:298: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:54.689 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:298: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:13:54.692 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1276: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1277: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1197 - ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - code: post(body, [{@hdr, invalid_utf8}, {"mcp-method", "tools/call"}, {"mcp-name", "echo"}]) - stacktrace: - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:976: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: (test) - -....... -19:13:54.744 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:13:54.795 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:54.796 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:946: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:864: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:13:54.803 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:626: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:919: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:585: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:530: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:491: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............................. -Finished in 1.8 seconds (0.9s async, 0.9s sync) -147 tests, 1 failure -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-c-M2never.txt b/slices/003-release-0-3-1/logs/mutation-c-M2never.txt deleted file mode 100644 index d31ff6d1..00000000 --- a/slices/003-release-0-3-1/logs/mutation-c-M2never.txt +++ /dev/null @@ -1,244 +0,0 @@ -M2never applied -=== M2never: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:12:45.756367803 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:13:55.883000528 -0400 -@@ -247,12 +247,8 @@ - # a module that may not be loaded. 500 means "carries no status of its own", which is the - # only case this transport should be answering for. - defp fault_response(conn, exception, stacktrace, id) do -- if Plug.Exception.status(exception) == 500 do -- Logger.error(Exception.format(:error, exception, stacktrace)) -- send_json(conn, 500, error(id, -32_603, "Internal error")) -- else -- reraise exception, stacktrace -- end -+ Logger.error(Exception.format(:error, exception, stacktrace)) -+ send_json(conn, 500, error(id, -32_603, "Internal error")) - end - - defp crash_response(conn) do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M2never: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 383655, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................................... -19:13:56.731 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -19:13:56.744 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:626: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:920: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:531: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:492: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:13:56.745 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:947: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:865: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:56.745 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:947: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:865: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:13:56.796 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -19:13:56.797 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:947: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:865: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:13:56.801 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:920: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:299: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:56.801 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:920: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:299: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:13:56.801 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:920: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:299: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:13:56.959 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:947: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:865: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:13:56.961 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:977: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:13:56.961 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -19:13:56.962 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:13:57.019 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:627: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:920: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:531: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:492: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:13:57.021 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:920: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:299: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:13:57.079 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:626: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:920: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:531: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:492: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:13:57.083 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1287: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:947: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:865: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1290: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -19:13:57.193 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1276: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:947: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:865: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1277: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:13:57.194 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -Finished in 1.8 seconds (0.8s async, 0.9s sync) -147 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/mutation-c-Mc2.txt b/slices/003-release-0-3-1/logs/mutation-c-Mc2.txt deleted file mode 100644 index d7936786..00000000 --- a/slices/003-release-0-3-1/logs/mutation-c-Mc2.txt +++ /dev/null @@ -1,279 +0,0 @@ -Mc2 applied -=== Mc2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:28:12.294926154 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:28:12.308431448 -0400 -@@ -634,7 +634,8 @@ - defp mirrored_params(%{"method" => "tools/call"} = message, opts) do - with name when is_binary(name) <- param(message, "name"), - catalog when not is_nil(catalog) <- opts.server_opts[:tool_catalog], -- {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end) do -+ {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end), -+ :ok <- check_annotations(name, entries) do - entries - else - # A host catalog that RAISES is not a catalog with no such tool, and collapsing the two -@@ -674,10 +675,8 @@ - # `with` unchanged, to the caller's `_ -> []`: a tool this catalog does not have mirrors - # no parameters, which is not a fault. - defp tool_annotations(catalog, name) do -- with {:ok, spec} <- ToolCatalog.fetch(catalog, name), -- entries = annotations(spec.input_schema), -- :ok <- check_annotations(name, entries) do -- {:ok, entries} -+ with {:ok, spec} <- ToolCatalog.fetch(catalog, name) do -+ {:ok, annotations(spec.input_schema)} - end - end - -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mc2: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 884732, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................... -19:28:13.271 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -19:28:13.379 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:28:13.386 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:678: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:637: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:543: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:28:13.387 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -19:28:13.437 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:28:13.437 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:28:13.440 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:28:13.440 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:28:13.441 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:28:13.441 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:28:13.443 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -19:28:13.448 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:678: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:637: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:543: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:28:13.550 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:28:13.564 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:679: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:637: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:543: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:28:13.617 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:28:13.668 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:28:13.674 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:1027: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:28:13.728 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -19:28:13.786 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........................... -19:28:16.251 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:249: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -19:28:16.255 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:28:16.315 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:28:16.329 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -156 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/mutation-c-Mc3.txt b/slices/003-release-0-3-1/logs/mutation-c-Mc3.txt deleted file mode 100644 index 929db358..00000000 --- a/slices/003-release-0-3-1/logs/mutation-c-Mc3.txt +++ /dev/null @@ -1,252 +0,0 @@ -Mc3 applied -=== Mc3: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:28:12.294926154 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:28:16.371243845 -0400 -@@ -645,7 +645,6 @@ - # Both fault shapes are matched by their own tag rather than by their SHAPE. An earlier - # draft matched the invalid-annotation case as a bare non-empty list, and `params.name` - # being a JSON array — caller-controlled — reaches this `else` as exactly that. -- {__MODULE__, :host_fault, _k, _r, _st} = fault -> fault - {__MODULE__, :invalid_annotation, _tool, _detail} = invalid -> invalid - _ -> [] - end -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mc3: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 819597, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................................ -19:28:17.258 [info] beam_mcp: refused by host authorize/1: :nope -....... -19:28:17.317 [error] ** (CaseClauseError) no case clause matching: - - {:ok, %{name: :echo}} - - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:210: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:28:17.321 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:28:17.379 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -19:28:17.381 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:28:17.381 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:28:17.381 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:28:17.433 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:28:17.484 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -19:28:17.484 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:28:17.535 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:28:17.535 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:28:17.535 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1026 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1075: (test) - - - - 2) test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1084 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1126: (test) - - -19:28:17.598 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:28:17.600 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:1027: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:28:17.600 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -19:28:17.702 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:997: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:915: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:28:19.381 [info] beam_mcp: refused by host authorize/1: :nope -. -19:28:19.386 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -19:28:20.171 [info] beam_mcp: refused by host authorize/1: :nope -. -19:28:20.176 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:249: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:970: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:346: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.3 seconds (0.8s async, 2.5s sync) -156 tests, 2 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-d-Md1.txt b/slices/003-release-0-3-1/logs/mutation-d-Md1.txt deleted file mode 100644 index 2238159d..00000000 --- a/slices/003-release-0-3-1/logs/mutation-d-Md1.txt +++ /dev/null @@ -1,391 +0,0 @@ -Md1 applied -=== Md1: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:25:16.748340865 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:25:31.594606344 -0400 -@@ -269,10 +269,7 @@ - read_body_bounded(conn) - end - -- case result do -- {:refused, conn, status, payload} -> {:refused, close_after(conn), status, payload} -- ok -> ok -- end -+ result - end - - # Answering a crash must not itself crash: the payload is a constant, so there is nothing -@@ -1028,11 +1025,6 @@ - |> send_resp(status, Jason.encode!(payload)) - end - -- # Refusing before the body is read leaves the connection with an unread remainder. Saying -- # so makes the refusal clean rather than leaving the adapter to drain a body this server -- # has already declined, or to drop the connection without telling the client. One caller, -- # `before_body/2`, which is the whole population -- see the derivation there. -- defp close_after(conn), do: put_resp_header(conn, "connection", "close") - - defp header_error(id, message) do - %{ -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Md1: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 88999, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -19:25:32.473 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -19:25:32.543 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:25:32.543 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:25:32.544 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:25:32.598 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:1025: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:25:32.605 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:675: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:634: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:579: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:540: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:25:32.714 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test the body cap a body over the cap is refused and the connection closed (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:440 - Assertion with == failed - code: assert get_resp_header(conn, "connection") == ["close"] - left: [] - right: ["close"] - stacktrace: - test/beam_mcp/transport/http_test.exs:456: (test) - -.......... -19:25:32.823 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:674: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:634: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:579: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:540: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:25:32.826 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -19:25:32.826 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -19:25:32.880 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:25:32.880 [info] beam_mcp: refused by host authorize/1: :nope -...... -19:25:32.982 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -19:25:33.038 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:674: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:634: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:579: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:540: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:25:33.039 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:25:33.039 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:25:33.039 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -19:25:33.040 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:25:33.040 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... - - 2) test a live listener: what a refusal does to the connection an Origin refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:222 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:25:33 GMT\r\ncontent-length: 82\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Origin not allowed\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:229: (test) - -. - - 3) test a live listener: what a refusal does to the connection an oversized body still ends the connection and says so (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:309 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 413 Request Entity Too Large\r\ndate: Mon, 07 Sep 2026 23:25:35 GMT\r\ncontent-length: 98\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Request body exceeds 1048576 bytes\"},\"id\":null,\"jsonrpc\":\"2.0\"}HTTP/1.1 200 OK\r\ndate: Mon, 07 Sep 2026 23:25:35 GMT\r\ncontent-length: 223\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"id\":2,\"jsonrpc\":\"2.0\",\"result\":{\"_meta\":{\"io.modelcontextprotocol/serverInfo\":{\"name\":\"beam_mcp\",\"version\":\"0.3.0\"}},\"content\":[{\"text\":\"{}\",\"type\":\"text\"}],\"isError\":false,\"resultType\":\"complete\",\"structuredContent\":{}}}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:322: (test) - - - - 4) test a live listener: what a refusal does to the connection a 405 ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:271 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 405 Method Not Allowed\r\ndate: Mon, 07 Sep 2026 23:25:36 GMT\r\ncontent-length: 97\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\nallow: POST\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Method not allowed: PUT; use POST\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:281: (test) - -. -19:25:37.651 [info] beam_mcp: refused by host authorize/1: :nope - -19:25:37.656 [error] ** (Bandit.HTTPError) Unable to read remaining data in request body - - - 5) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:285 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:25:37 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:301: (test) - - -19:25:37.661 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - - - 6) test a live listener: what a refusal does to the connection an authorize breaking its contract ends the connection instead of draining (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:258 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:25:37 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:267: (test) - - -19:25:38.366 [info] beam_mcp: refused by host authorize/1: :nope - - - 7) test a live listener: what a refusal does to the connection an authorize refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:236 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:25:38 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:242: (test) - - -19:25:39.072 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:249: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - - - - 8) test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:246 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 500 Internal Server Error\r\ndate: Mon, 07 Sep 2026 23:25:38 GMT\r\ncontent-length: 78\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32603,\"message\":\"Internal error\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:254: (test) - - -Finished in 7.6 seconds (0.9s async, 6.7s sync) -156 tests, 8 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-d-Md2.txt b/slices/003-release-0-3-1/logs/mutation-d-Md2.txt deleted file mode 100644 index 7a8e2369..00000000 --- a/slices/003-release-0-3-1/logs/mutation-d-Md2.txt +++ /dev/null @@ -1,288 +0,0 @@ -Md2 applied -=== Md2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:25:16.748340865 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:25:16.843548966 -0400 -@@ -225,7 +225,7 @@ - # `with/else` cannot see bindings made inside the `with`, so an earlier version - # answered on the pre-`read_body` conn and Bandit framed the next request's bytes as - # this one's unread body. Size-dependent, so every small test passed. -- {:refused, conn, status, payload} -> send_json(conn, status, payload) -+ {:refused, conn, status, payload} -> send_json(close_after(conn), status, payload) - end - end - -@@ -269,10 +269,7 @@ - read_body_bounded(conn) - end - -- case result do -- {:refused, conn, status, payload} -> {:refused, close_after(conn), status, payload} -- ok -> ok -- end -+ result - end - - # Answering a crash must not itself crash: the payload is a constant, so there is nothing -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Md2: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 495535, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................................... -19:25:17.891 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:675: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:634: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:579: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:540: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:25:17.895 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:674: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:634: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:579: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:540: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:25:17.896 [info] beam_mcp: refused by host authorize/1: :nope -....... -19:25:18.003 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:25:18.003 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -19:25:18.006 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:1025: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:25:18.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:25:18.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:25:18.012 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:674: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:634: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:579: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:540: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -19:25:18.129 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:25:18.129 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:25:18.130 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -19:25:18.130 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -19:25:18.181 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:25:18.182 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:25:18.182 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:25:18.182 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -19:25:18.337 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:25:18.389 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:995: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:913: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -19:25:19.382 [info] beam_mcp: refused by host authorize/1: :nope -. - - 1) test a live listener: what a refusal does to the connection a refusal AFTER the body has been read keeps the connection (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:186 - Assertion with == failed - code: assert responses(bytes) == 2 - left: 1 - right: 2 - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:199: (test) - -... -19:25:20.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -19:25:20.121 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:249: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:968: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:343: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:268: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -19:25:20.177 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 2.6 seconds (0.8s async, 1.7s sync) -156 tests, 1 failure -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-r-Mr1.txt b/slices/003-release-0-3-1/logs/mutation-r-Mr1.txt deleted file mode 100644 index 411d2789..00000000 --- a/slices/003-release-0-3-1/logs/mutation-r-Mr1.txt +++ /dev/null @@ -1,315 +0,0 @@ -Mr1 applied -=== Mr1: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:39:47.966073639 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:39:47.979664780 -0400 -@@ -749,7 +749,7 @@ - # from the schema, and judging it on the caller's VALUE instead would make a caller who - # sends the wrong shape into a host fault — the wrong side of the trust boundary, which is - # the mistake this check exists to stop making in the other direction. -- @annotatable_types ~w(string integer boolean) -+ @annotatable_types ~w(string integer boolean number object array) - - # TWO MUSTs, ONE DERIVATION. Both are decided from the schema and neither from the request, - # so the verdict on a tool is the same whatever the caller sends -- which is the test in -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mr1: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 503863, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... - - 1) test the HTTP transport's README claims a forbidden x-mcp-header annotation is the host's fault, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:533 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/readme_claims_test.exs:566: (test) - -... -19:39:48.898 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 2) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1466 - a schema the specification forbids is the host's bug. Refusing the caller with 400 tells them to fix a header they wrote correctly, and no header they can write will ever satisfy it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1481: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1478: (test) - -..... -19:39:48.922 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1045: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:39:48.923 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -19:39:48.950 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:39:49.002 [info] beam_mcp: refused by host authorize/1: :nope -........ -19:39:49.111 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:39:49.113 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -19:39:49.276 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:39:49.276 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:39:49.277 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - -19:39:49.277 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:39:49.277 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:39:49.277 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 3) test an x-mcp-header annotation the specification forbids is the host's fault the refusal does not depend on the caller sending the header (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1503 - Assertion with == failed - code: assert post(call_body(%{"ratio" => 1.5}), call_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1508: (test) - -..... - - 4) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1513 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1519: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1516: (test) - -.... -19:39:49.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -19:39:49.388 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -19:39:49.444 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:39:49.445 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:39:49.445 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:39:49.445 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -19:39:51.177 [info] beam_mcp: refused by host authorize/1: :nope -. -19:39:51.183 [info] beam_mcp: refused by host authorize/1: :nope -. -19:39:51.187 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:250: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -19:39:51.916 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -158 tests, 4 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-r-Mr2.txt b/slices/003-release-0-3-1/logs/mutation-r-Mr2.txt deleted file mode 100644 index 219f12de..00000000 --- a/slices/003-release-0-3-1/logs/mutation-r-Mr2.txt +++ /dev/null @@ -1,306 +0,0 @@ -Mr2 applied -=== Mr2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:39:47.966073639 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:39:51.969376330 -0400 -@@ -790,7 +790,7 @@ - defp check_annotation_uniqueness(tool, entries) do - collisions = - entries -- |> Enum.group_by(fn {name, _path, _type} -> String.downcase(name) end) -+ |> Enum.group_by(fn {name, _path, _type} -> name end) - |> Enum.filter(fn {_folded, group} -> length(group) > 1 end) - - case collisions do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mr2: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 619708, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -19:39:52.854 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... - - 1) test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1629 - one header cannot mirror two properties. Enforcing both against it refuses a caller who wrote the header exactly as tools/list advertised, and enforcing one of them serves a weaker contract than was advertised. The definition is invalid and the host is the party who can fix it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1647: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1639: (test) - -.......... -19:39:53.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -19:39:53.171 [info] beam_mcp: refused by host authorize/1: :nope -. -19:39:53.223 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:39:53.223 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:39:53.226 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:39:53.227 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:39:53.227 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:39:53.227 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:39:53.229 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -19:39:53.280 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:39:53.286 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:39:53.292 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:39:53.298 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:39:53.298 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:39:53.350 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:39:53.407 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1045: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:39:53.409 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 2) test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1666 - Assertion with == failed - code: assert post(body, collide_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1673: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1672: (test) - -...... -19:39:53.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:39:53.420 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. - - 3) test x-mcp-header values MUST be case-insensitively unique (SCR-275) a nested annotation colliding with an outer one is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1681 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1686: (test) - -........ -19:39:54.529 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:250: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -19:39:54.535 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:39:54.538 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:39:55.300 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 3.3 seconds (0.8s async, 2.5s sync) -158 tests, 3 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-rebased.txt b/slices/003-release-0-3-1/logs/mutation-rebased.txt deleted file mode 100644 index 63f76473..00000000 --- a/slices/003-release-0-3-1/logs/mutation-rebased.txt +++ /dev/null @@ -1,59 +0,0 @@ -### EVERY MUTANT RE-SCORED ON THE REBASED TREE, TWICE, PLUS THE NEW ONE FOR DEFECT (e). -### -### Why this file exists: PR #12 (slice 004) merged first, so this branch was rebased onto a -### different `main` and therefore a different tree. A score from a run on a different tree is -### not a score for this one -- slice 002 round 7's blocker was exactly that -- so the whole set -### was re-run here rather than carried forward from `mutation-round3.txt`. -### -### Me1 is new: it is the anchor for defect (e), and its FIRST FORM WAS A COMPILER KILL. -### Reverting `header_values/2` alone left five `:invalid_bytes` clauses unreachable and -### `--warnings-as-errors` rejected the build before the suite ran -- recorded here rather than -### quietly fixed, because CONVENTIONS.md names that as a kill that never happened: -### -### warning: the following clause will never match -### Compilation failed due to warnings while using the --warnings-as-errors option -### TEST_EXIT=1 (no test count: no test ran) -### -### Completed by removing what it orphans, it kills. So the anchor for (e) can move. - -base: origin/main 955d501 HEAD: 86530a0 tree: dbc055fa - -mutant pass 1 pass 2 verdict round-3 record -M13rev 160 tests, 1 failure EXIT=2 160 tests, 1 failure EXIT=2 KILLED 1 failure MATCH -M2always 160 tests, 1 failure EXIT=2 160 tests, 1 failure EXIT=2 KILLED 1 failure MATCH -M2never 160 tests, 0 failures EXIT=0 160 tests, 0 failures EXIT=0 SURVIVOR 0 failures MATCH -Mc2 160 tests, 0 failures EXIT=0 160 tests, 0 failures EXIT=0 SURVIVOR 0 failures MATCH -Mc3 160 tests, 2 failures EXIT=2 160 tests, 2 failures EXIT=2 KILLED 2 failures MATCH -Md1 160 tests, 9 failures EXIT=2 160 tests, 9 failures EXIT=2 KILLED 9 failures MATCH -Md2 160 tests, 2 failures EXIT=2 160 tests, 2 failures EXIT=2 KILLED 2 failures MATCH -Mr1 160 tests, 4 failures EXIT=2 160 tests, 4 failures EXIT=2 KILLED 4 failures MATCH -Mr2 160 tests, 3 failures EXIT=2 160 tests, 3 failures EXIT=2 KILLED 3 failures MATCH -Me1 160 tests, 1 failure EXIT=2 160 tests, 1 failure EXIT=2 KILLED (new) - -Test total 158 -> 160: defect (e) added two tests. Every verdict and every failure count -reproduces the round-3 record. The two survivors are still survivors, with their arguments -unchanged. - -### AN INSTABILITY IN THE HARNESS, RECORDED RATHER THAN SMOOTHED OVER -### -### Across 40 back-to-back suite runs while producing this table, TWO runs reported one extra -### failure than the mutant deserves: M13rev read 2 once (record: 1) and Mr2 read 4 once -### (record: 3). Neither changed a verdict -- both were already KILLED. -### -### Measured rather than assumed, because a flake that ADDS a failure is the one that makes a -### SURVIVOR read as KILLED, which is precisely what round 3 caught: -### -### Mr2 alone, 6 consecutive runs: 3, 3, 3, 3, 3, 3 failures -- stable, matches record -### M13rev alone, 5 consecutive runs: 1, 1, 1, 1, 1 failures -- stable, matches record -### BASELINE unmutated, 6 consecutive: 0, 0, 0, 0, 0, 0 failures -- the shipping tree is clean -### -### So each mutant is stable when measured the way the round-3 record measured it, and the -### extra failure is induced by running twenty suites back-to-back -- almost certainly the -### Bandit-backed timing test under sustained load, which is the same component whose 700 ms -### window produced round 3's false KILLED. -### -### THE NUMBERS IN THE TABLE ABOVE ARE THE ISOLATED RUNS, and the load artefact is reported -### here rather than folded into them. It is filed in FINDINGS.md: the two survivors are the -### rows this instability could corrupt, and neither was observed corrupted in any of the runs -### above -- but "not observed" is weaker than "cannot happen", and the harness is not yet -### strong enough to say the second thing. diff --git a/slices/003-release-0-3-1/logs/mutation-round3.M13rev.txt b/slices/003-release-0-3-1/logs/mutation-round3.M13rev.txt deleted file mode 100644 index 1e02c53a..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.M13rev.txt +++ /dev/null @@ -1,578 +0,0 @@ -M13rev applied -=== M13rev: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:20.019348746 -0400 -@@ -643,7 +643,9 @@ - defp mirrored_params(%{"method" => "tools/call"} = message, opts) do - with name when is_binary(name) <- param(message, "name"), - catalog when not is_nil(catalog) <- opts.server_opts[:tool_catalog], -- {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end) do -+ {:ok, spec} <- host_call(fn -> ToolCatalog.fetch(catalog, name) end), -+ entries = annotations(spec.input_schema), -+ :ok <- check_annotations(name, entries) do - entries - else - # A host catalog that RAISES is not a catalog with no such tool, and collapsing the two -@@ -690,13 +692,6 @@ - # `ToolCatalog.fetch/2` returning anything but `{:ok, spec}` still falls through this - # `with` unchanged, to the caller's `_ -> []`: a tool this catalog does not have mirrors - # no parameters, which is not a fault. -- defp tool_annotations(catalog, name) do -- with {:ok, spec} <- ToolCatalog.fetch(catalog, name), -- entries = annotations(spec.input_schema), -- :ok <- check_annotations(name, entries) do -- {:ok, entries} -- end -- end - - # ONE ENTRY PER ANNOTATED PROPERTY, and a list rather than a map keyed by the case-folded - # name. The key was the defect: `Map.put` dropped a sibling annotated with the same name in -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M13rev: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 627799, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -19:46:20.826 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -19:46:20.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -19:46:20.966 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:46:20.981 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:20.981 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:20.982 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:20.982 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:20.982 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -19:46:21.032 [info] beam_mcp: refused by host authorize/1: :nope -.......... -19:46:21.188 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -19:46:21.191 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:21.196 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:21.196 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:21.247 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -19:46:21.256 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:647: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:21.257 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1040: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:21.258 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:21.258 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:21.258 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1161 - Assertion with == failed - code: assert body!(conn)["id"] == 4242 - left: nil - right: 4242 - stacktrace: - test/beam_mcp/transport/http_test.exs:1191: (test) - -....................................... -19:46:21.484 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -19:46:23.188 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:23.243 [info] beam_mcp: refused by host authorize/1: :nope -... -19:46:23.259 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -19:46:23.972 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 1 failure -TEST_EXIT=2 -M13rev applied -=== M13rev: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:24.008774509 -0400 -@@ -643,7 +643,9 @@ - defp mirrored_params(%{"method" => "tools/call"} = message, opts) do - with name when is_binary(name) <- param(message, "name"), - catalog when not is_nil(catalog) <- opts.server_opts[:tool_catalog], -- {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end) do -+ {:ok, spec} <- host_call(fn -> ToolCatalog.fetch(catalog, name) end), -+ entries = annotations(spec.input_schema), -+ :ok <- check_annotations(name, entries) do - entries - else - # A host catalog that RAISES is not a catalog with no such tool, and collapsing the two -@@ -690,13 +692,6 @@ - # `ToolCatalog.fetch/2` returning anything but `{:ok, spec}` still falls through this - # `with` unchanged, to the caller's `_ -> []`: a tool this catalog does not have mirrors - # no parameters, which is not a fault. -- defp tool_annotations(catalog, name) do -- with {:ok, spec} <- ToolCatalog.fetch(catalog, name), -- entries = annotations(spec.input_schema), -- :ok <- check_annotations(name, entries) do -- {:ok, entries} -- end -- end - - # ONE ENTRY PER ANNOTATED PROPERTY, and a list rather than a map keyed by the case-folded - # name. The key was the defect: `Map.put` dropped a sibling annotated with the same name in -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M13rev: suite === -Running ExUnit with seed: 379315, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -19:46:24.582 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -19:46:24.777 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1040: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -19:46:24.884 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:24.884 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:24.940 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:25.043 [info] beam_mcp: refused by host authorize/1: :nope -................ -19:46:25.164 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:647: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:25.165 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:25.165 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1161 - Assertion with == failed - code: assert body!(conn)["id"] == 4242 - left: nil - right: 4242 - stacktrace: - test/beam_mcp/transport/http_test.exs:1191: (test) - -.......... -19:46:25.168 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -19:46:25.169 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:25.169 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:25.169 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:25.175 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -19:46:25.285 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:25.285 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -19:46:25.285 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -19:46:25.286 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:25.286 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:25.286 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -19:46:26.989 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:26.993 [info] beam_mcp: refused by host authorize/1: :nope -... -19:46:27.712 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -19:46:27.718 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 1 failure -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.M2always.txt b/slices/003-release-0-3-1/logs/mutation-round3.M2always.txt deleted file mode 100644 index 155e588f..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.M2always.txt +++ /dev/null @@ -1,550 +0,0 @@ -M2always applied -=== M2always: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:27.762678781 -0400 -@@ -298,13 +298,8 @@ - # :plug_status. It therefore holds for adapters other than Bandit and needs no reference to - # a module that may not be loaded. 500 means "carries no status of its own", which is the - # only case this transport should be answering for. -- defp fault_response(conn, exception, stacktrace, id) do -- if Plug.Exception.status(exception) == 500 do -- Logger.error(Exception.format(:error, exception, stacktrace)) -- send_json(conn, 500, error(id, -32_603, "Internal error")) -- else -- reraise exception, stacktrace -- end -+ defp fault_response(_conn, exception, stacktrace, _id) do -+ reraise exception, stacktrace - end - - defp crash_response(conn) do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M2always: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 210511, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -19:46:28.382 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -19:46:28.554 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:46:28.555 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:28.560 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................... -19:46:28.826 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:46:28.930 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:28.930 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:28.938 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:690: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:641: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:547: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:28.939 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1197 - ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - code: post(body, [{@hdr, invalid_utf8}, {"mcp-method", "tools/call"}, {"mcp-name", "echo"}]) - stacktrace: - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1040: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: (test) - -.... -19:46:28.943 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:689: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:641: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:547: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:46:29.047 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:29.047 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:29.047 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:29.048 [info] beam_mcp: refused by host authorize/1: :nope -... -19:46:29.105 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:689: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:641: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:547: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:29.106 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:29.106 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:29.107 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:46:29.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -19:46:30.105 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -19:46:30.814 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -19:46:30.874 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:30.877 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 1 failure -TEST_EXIT=2 -M2always applied -=== M2always: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:31.626239240 -0400 -@@ -298,13 +298,8 @@ - # :plug_status. It therefore holds for adapters other than Bandit and needs no reference to - # a module that may not be loaded. 500 means "carries no status of its own", which is the - # only case this transport should be answering for. -- defp fault_response(conn, exception, stacktrace, id) do -- if Plug.Exception.status(exception) == 500 do -- Logger.error(Exception.format(:error, exception, stacktrace)) -- send_json(conn, 500, error(id, -32_603, "Internal error")) -- else -- reraise exception, stacktrace -- end -+ defp fault_response(_conn, exception, stacktrace, _id) do -+ reraise exception, stacktrace - end - - defp crash_response(conn) do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M2always: suite === -Running ExUnit with seed: 986342, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -19:46:32.172 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -19:46:32.327 [info] beam_mcp: refused by host authorize/1: :nope -... -19:46:32.384 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:689: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:641: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:547: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:32.385 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ - - 1) test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1197 - ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - code: post(body, [{@hdr, invalid_utf8}, {"mcp-method", "tools/call"}, {"mcp-name", "echo"}]) - stacktrace: - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1040: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: (test) - -...... -19:46:32.399 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -19:46:32.400 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:46:32.400 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:32.400 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -19:46:32.401 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:32.401 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:32.401 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:32.401 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -19:46:32.610 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -19:46:32.662 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:32.662 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:32.765 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:32.775 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:689: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:641: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:547: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:32.834 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:690: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:641: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:586: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:547: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:46:32.887 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1010: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:928: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -19:46:33.859 [info] beam_mcp: refused by host authorize/1: :nope -.... -19:46:34.635 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:34.639 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -19:46:35.354 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:983: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:350: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 1 failure -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.M2never.txt b/slices/003-release-0-3-1/logs/mutation-round3.M2never.txt deleted file mode 100644 index 78cd99cf..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.M2never.txt +++ /dev/null @@ -1,544 +0,0 @@ -M2never applied -=== M2never: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:35.405186441 -0400 -@@ -299,12 +299,8 @@ - # a module that may not be loaded. 500 means "carries no status of its own", which is the - # only case this transport should be answering for. - defp fault_response(conn, exception, stacktrace, id) do -- if Plug.Exception.status(exception) == 500 do -- Logger.error(Exception.format(:error, exception, stacktrace)) -- send_json(conn, 500, error(id, -32_603, "Internal error")) -- else -- reraise exception, stacktrace -- end -+ Logger.error(Exception.format(:error, exception, stacktrace)) -+ send_json(conn, 500, error(id, -32_603, "Internal error")) - end - - defp crash_response(conn) do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M2never: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 878479, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -19:46:36.077 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -19:46:36.256 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:36.262 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:642: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:587: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:548: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:46:36.264 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -19:46:36.264 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:36.265 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:46:36.326 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1041: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -19:46:36.380 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:46:36.485 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:46:36.539 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:36.539 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:36.597 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:690: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:642: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:587: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:548: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:36.598 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:36.598 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:36.598 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:46:36.654 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -19:46:36.659 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:690: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:642: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:587: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:548: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:36.659 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:36.659 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:46:36.659 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -19:46:37.706 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -19:46:37.764 [info] beam_mcp: refused by host authorize/1: :nope -..... -19:46:38.487 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:46:39.197 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.2 seconds (0.8s async, 2.4s sync) -158 tests, 0 failures -TEST_EXIT=0 -M2never applied -=== M2never: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:39.236031471 -0400 -@@ -299,12 +299,8 @@ - # a module that may not be loaded. 500 means "carries no status of its own", which is the - # only case this transport should be answering for. - defp fault_response(conn, exception, stacktrace, id) do -- if Plug.Exception.status(exception) == 500 do -- Logger.error(Exception.format(:error, exception, stacktrace)) -- send_json(conn, 500, error(id, -32_603, "Internal error")) -- else -- reraise exception, stacktrace -- end -+ Logger.error(Exception.format(:error, exception, stacktrace)) -+ send_json(conn, 500, error(id, -32_603, "Internal error")) - end - - defp crash_response(conn) do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== M2never: suite === -Running ExUnit with seed: 634925, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -19:46:39.806 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -19:46:39.990 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:46:39.991 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:39.991 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -19:46:40.104 [info] beam_mcp: refused by host authorize/1: :nope -.......... -19:46:40.211 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:40.211 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -19:46:40.211 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:46:40.217 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:690: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:642: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:587: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:548: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -19:46:40.218 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:40.218 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:40.219 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:46:40.225 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:642: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:587: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:548: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:40.225 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:40.226 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1041: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -19:46:40.282 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:40.283 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1011: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:929: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:40.287 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:690: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:642: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:587: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:548: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:40.390 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -19:46:40.441 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -19:46:41.512 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:41.517 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:984: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:351: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -19:46:41.525 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -19:46:43.025 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.Mc2.txt b/slices/003-release-0-3-1/logs/mutation-round3.Mc2.txt deleted file mode 100644 index fba2132d..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.Mc2.txt +++ /dev/null @@ -1,560 +0,0 @@ -Mc2 applied -=== Mc2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:43.080648771 -0400 -@@ -643,7 +643,8 @@ - defp mirrored_params(%{"method" => "tools/call"} = message, opts) do - with name when is_binary(name) <- param(message, "name"), - catalog when not is_nil(catalog) <- opts.server_opts[:tool_catalog], -- {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end) do -+ {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end), -+ :ok <- check_annotations(name, entries) do - entries - else - # A host catalog that RAISES is not a catalog with no such tool, and collapsing the two -@@ -691,10 +692,8 @@ - # `with` unchanged, to the caller's `_ -> []`: a tool this catalog does not have mirrors - # no parameters, which is not a fault. - defp tool_annotations(catalog, name) do -- with {:ok, spec} <- ToolCatalog.fetch(catalog, name), -- entries = annotations(spec.input_schema), -- :ok <- check_annotations(name, entries) do -- {:ok, entries} -+ with {:ok, spec} <- ToolCatalog.fetch(catalog, name) do -+ {:ok, annotations(spec.input_schema)} - end - end - -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mc2: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 532612, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -19:46:43.735 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -19:46:43.856 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:43.856 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:43.856 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:43.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:46:43.871 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:43.874 [info] beam_mcp: refused by host authorize/1: :nope -.... -19:46:43.930 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:43.931 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -19:46:43.984 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -19:46:44.096 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -19:46:44.103 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:696: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:44.103 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:44.105 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1044: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:44.157 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -19:46:44.321 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:44.321 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -19:46:44.379 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:44.380 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:44.380 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -19:46:45.393 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:45.399 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:46:45.454 [info] beam_mcp: refused by host authorize/1: :nope -..... -19:46:46.181 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 0 failures -TEST_EXIT=0 -Mc2 applied -=== Mc2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:46.924002642 -0400 -@@ -643,7 +643,8 @@ - defp mirrored_params(%{"method" => "tools/call"} = message, opts) do - with name when is_binary(name) <- param(message, "name"), - catalog when not is_nil(catalog) <- opts.server_opts[:tool_catalog], -- {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end) do -+ {:ok, entries} <- host_call(fn -> tool_annotations(catalog, name) end), -+ :ok <- check_annotations(name, entries) do - entries - else - # A host catalog that RAISES is not a catalog with no such tool, and collapsing the two -@@ -691,10 +692,8 @@ - # `with` unchanged, to the caller's `_ -> []`: a tool this catalog does not have mirrors - # no parameters, which is not a fault. - defp tool_annotations(catalog, name) do -- with {:ok, spec} <- ToolCatalog.fetch(catalog, name), -- entries = annotations(spec.input_schema), -- :ok <- check_annotations(name, entries) do -- {:ok, entries} -+ with {:ok, spec} <- ToolCatalog.fetch(catalog, name) do -+ {:ok, annotations(spec.input_schema)} - end - end - -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mc2: suite === -Running ExUnit with seed: 317524, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -19:46:47.487 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -19:46:47.698 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:696: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:47.751 [info] beam_mcp: refused by host authorize/1: :nope -........... -19:46:47.809 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:47.863 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -19:46:47.921 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:47.973 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:46:47.974 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:48.026 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -19:46:48.027 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -19:46:48.082 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1044: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:46:48.083 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:48.083 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:46:48.140 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:46:48.200 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:48.200 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:46:48.252 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:48.253 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:48.253 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:48.253 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -19:46:49.945 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:46:49.952 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -19:46:50.016 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:50.020 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -158 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.Mc3.txt b/slices/003-release-0-3-1/logs/mutation-round3.Mc3.txt deleted file mode 100644 index 3cd193c0..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.Mc3.txt +++ /dev/null @@ -1,506 +0,0 @@ -Mc3 applied -=== Mc3: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:50.780647288 -0400 -@@ -654,7 +654,6 @@ - # Both fault shapes are matched by their own tag rather than by their SHAPE. An earlier - # draft matched the invalid-annotation case as a bare non-empty list, and `params.name` - # being a JSON array — caller-controlled — reaches this `else` as exactly that. -- {__MODULE__, :host_fault, _k, _r, _st} = fault -> fault - {__MODULE__, :invalid_annotation, _tool, _detail} = invalid -> invalid - _ -> [] - end -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mc3: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 240854, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -19:46:51.420 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -19:46:51.616 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -19:46:51.680 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1084 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1126: (test) - -... -19:46:51.681 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -19:46:51.786 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -19:46:51.896 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1044: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:51.897 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:51.897 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:51.897 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:51.897 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:51.898 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:51.898 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -19:46:51.899 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:46:51.952 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................ -19:46:52.065 [error] ** (CaseClauseError) no case clause matching: - - {:ok, %{name: :echo}} - - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:210: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:52.065 [info] beam_mcp: refused by host authorize/1: :nope -.. - - 2) test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1026 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1075: (test) - -... -19:46:52.122 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:52.122 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -19:46:53.114 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -19:46:53.176 [info] beam_mcp: refused by host authorize/1: :nope -.... -19:46:54.601 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:46:54.605 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 2 failures -TEST_EXIT=2 -Mc3 applied -=== Mc3: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:54.641330503 -0400 -@@ -654,7 +654,6 @@ - # Both fault shapes are matched by their own tag rather than by their SHAPE. An earlier - # draft matched the invalid-annotation case as a bare non-empty list, and `params.name` - # being a JSON array — caller-controlled — reaches this `else` as exactly that. -- {__MODULE__, :host_fault, _k, _r, _st} = fault -> fault - {__MODULE__, :invalid_annotation, _tool, _detail} = invalid -> invalid - _ -> [] - end -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mc3: suite === -Running ExUnit with seed: 27049, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -19:46:55.175 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -19:46:55.481 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:55.593 [error] ** (CaseClauseError) no case clause matching: - - {:ok, %{name: :echo}} - - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:210: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -19:46:55.645 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -19:46:55.646 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:55.646 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:55.646 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:55.648 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:46:55.648 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:55.648 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:46:55.653 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1026 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1075: (test) - -................. -19:46:55.763 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -19:46:55.819 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1044: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:46:55.820 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:55.820 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:55.820 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:46:55.872 [info] beam_mcp: refused by host authorize/1: :nope -............... -19:46:55.932 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1014: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:932: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ - - 2) test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1084 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1126: (test) - -.............. -19:46:56.888 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:987: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -19:46:56.945 [info] beam_mcp: refused by host authorize/1: :nope -. -19:46:56.949 [info] beam_mcp: refused by host authorize/1: :nope -... -19:46:58.365 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 2 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.Md1.txt b/slices/003-release-0-3-1/logs/mutation-round3.Md1.txt deleted file mode 100644 index 29524570..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.Md1.txt +++ /dev/null @@ -1,806 +0,0 @@ -Md1 applied -=== Md1: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:46:58.416004389 -0400 -@@ -278,10 +278,7 @@ - read_body_bounded(conn) - end - -- case result do -- {:refused, conn, status, payload} -> {:refused, close_after(conn), status, payload} -- ok -> ok -- end -+ result - end - - # Answering a crash must not itself crash: the payload is a constant, so there is nothing -@@ -1045,11 +1042,6 @@ - |> send_resp(status, Jason.encode!(payload)) - end - -- # Refusing before the body is read leaves the connection with an unread remainder. Saying -- # so makes the refusal clean rather than leaving the adapter to drain a body this server -- # has already declined, or to drop the connection without telling the client. One caller, -- # `before_body/2`, which is the whole population -- see the derivation there. -- defp close_after(conn), do: put_resp_header(conn, "connection", "close") - - defp header_error(id, message) do - %{ -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Md1: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 867842, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. - - 1) test the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:576 - Assertion with == failed - code: assert Plug.Conn.get_resp_header(refused, "connection") == ["close"] - left: [] - right: ["close"] - stacktrace: - test/beam_mcp/readme_claims_test.exs:593: (test) - -.. -19:46:59.078 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -19:46:59.259 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:46:59.313 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -19:46:59.418 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:59.418 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -19:46:59.520 [info] beam_mcp: refused by host authorize/1: :nope -... -19:46:59.632 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:692: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:59.632 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:46:59.633 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:59.633 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:59.633 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. - - 2) test the body cap a body over the cap is refused and the connection closed (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:440 - Assertion with == failed - code: assert get_resp_header(conn, "connection") == ["close"] - left: [] - right: ["close"] - stacktrace: - test/beam_mcp/transport/http_test.exs:456: (test) - -..... -19:46:59.691 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:46:59.696 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:46:59.699 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1042: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:46:59.701 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:46:59.701 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -19:46:59.701 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:46:59.701 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -19:46:59.705 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -19:46:59.706 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -19:47:00.693 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - - - - 3) test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:261 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 500 Internal Server Error\r\ndate: Mon, 07 Sep 2026 23:46:59 GMT\r\ncontent-length: 78\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32603,\"message\":\"Internal error\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:269: (test) - - -19:47:01.457 [info] beam_mcp: refused by host authorize/1: :nope - -19:47:01.462 [error] ** (Bandit.HTTPError) Unable to read remaining data in request body - - - 4) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:300 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:00 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:316: (test) - - - - 5) test a live listener: what a refusal does to the connection an Origin refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:237 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:00 GMT\r\ncontent-length: 82\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Origin not allowed\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:244: (test) - - -19:47:02.172 [info] beam_mcp: refused by host authorize/1: :nope - - - 6) test a live listener: what a refusal does to the connection an authorize refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:251 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:01 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:257: (test) - -. - - 7) test a live listener: what a refusal does to the connection a 405 ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:286 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 405 Method Not Allowed\r\ndate: Mon, 07 Sep 2026 23:47:02 GMT\r\ncontent-length: 97\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\nallow: POST\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Method not allowed: PUT; use POST\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:296: (test) - -. -19:47:05.000 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - - - 8) test a live listener: what a refusal does to the connection an authorize breaking its contract ends the connection instead of draining (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:273 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:04 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:282: (test) - - - - 9) test a live listener: what a refusal does to the connection an oversized body still ends the connection and says so (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:324 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 413 Request Entity Too Large\r\ndate: Mon, 07 Sep 2026 23:47:04 GMT\r\ncontent-length: 98\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Request body exceeds 1048576 bytes\"},\"id\":null,\"jsonrpc\":\"2.0\"}HTTP/1.1 200 OK\r\ndate: Mon, 07 Sep 2026 23:47:04 GMT\r\ncontent-length: 223\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"id\":2,\"jsonrpc\":\"2.0\",\"result\":{\"_meta\":{\"io.modelcontextprotocol/serverInfo\":{\"name\":\"beam_mcp\",\"version\":\"0.3.1\"}},\"content\":[{\"text\":\"{}\",\"type\":\"text\"}],\"isError\":false,\"resultType\":\"complete\",\"structuredContent\":{}}}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:337: (test) - - -Finished in 7.5 seconds (0.8s async, 6.6s sync) -158 tests, 9 failures -TEST_EXIT=2 -Md1 applied -=== Md1: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:47:06.453166748 -0400 -@@ -278,10 +278,7 @@ - read_body_bounded(conn) - end - -- case result do -- {:refused, conn, status, payload} -> {:refused, close_after(conn), status, payload} -- ok -> ok -- end -+ result - end - - # Answering a crash must not itself crash: the payload is a constant, so there is nothing -@@ -1045,11 +1042,6 @@ - |> send_resp(status, Jason.encode!(payload)) - end - -- # Refusing before the body is read leaves the connection with an unread remainder. Saying -- # so makes the refusal clean rather than leaving the adapter to drain a body this server -- # has already declined, or to drop the connection without telling the client. One caller, -- # `before_body/2`, which is the whole population -- see the derivation there. -- defp close_after(conn), do: put_resp_header(conn, "connection", "close") - - defp header_error(id, message) do - %{ -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Md1: suite === -Running ExUnit with seed: 917473, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ - - 1) test the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:576 - Assertion with == failed - code: assert Plug.Conn.get_resp_header(refused, "connection") == ["close"] - left: [] - right: ["close"] - stacktrace: - test/beam_mcp/readme_claims_test.exs:593: (test) - -..... -19:47:07.176 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -19:47:07.305 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:07.305 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:07.306 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:47:07.306 [info] beam_mcp: refused by host authorize/1: :nope -........ -19:47:07.362 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -19:47:07.476 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:07.476 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:07.477 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:47:07.479 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:47:07.532 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -19:47:07.584 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -19:47:07.585 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:07.585 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:07.585 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:07.589 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1042: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. - - 2) test the body cap a body over the cap is refused and the connection closed (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:440 - Assertion with == failed - code: assert get_resp_header(conn, "connection") == ["close"] - left: [] - right: ["close"] - stacktrace: - test/beam_mcp/transport/http_test.exs:456: (test) - -......... -19:47:07.707 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:692: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -19:47:07.817 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:07.818 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -19:47:07.818 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -19:47:08.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - - - 3) test a live listener: what a refusal does to the connection an authorize breaking its contract ends the connection instead of draining (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:273 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:07 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:282: (test) - - - - 4) test a live listener: what a refusal does to the connection an oversized body still ends the connection and says so (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:324 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 413 Request Entity Too Large\r\ndate: Mon, 07 Sep 2026 23:47:08 GMT\r\ncontent-length: 98\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Request body exceeds 1048576 bytes\"},\"id\":null,\"jsonrpc\":\"2.0\"}HTTP/1.1 200 OK\r\ndate: Mon, 07 Sep 2026 23:47:08 GMT\r\ncontent-length: 223\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"id\":2,\"jsonrpc\":\"2.0\",\"result\":{\"_meta\":{\"io.modelcontextprotocol/serverInfo\":{\"name\":\"beam_mcp\",\"version\":\"0.3.1\"}},\"content\":[{\"text\":\"{}\",\"type\":\"text\"}],\"isError\":false,\"resultType\":\"complete\",\"structuredContent\":{}}}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:337: (test) - - -19:47:10.291 [info] beam_mcp: refused by host authorize/1: :nope - - - 5) test a live listener: what a refusal does to the connection an authorize refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:251 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:09 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:257: (test) - - -19:47:10.998 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - - - - 6) test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:261 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 500 Internal Server Error\r\ndate: Mon, 07 Sep 2026 23:47:10 GMT\r\ncontent-length: 78\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32603,\"message\":\"Internal error\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:269: (test) - - - - 7) test a live listener: what a refusal does to the connection a 405 ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:286 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 405 Method Not Allowed\r\ndate: Mon, 07 Sep 2026 23:47:10 GMT\r\ncontent-length: 97\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\nallow: POST\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Method not allowed: PUT; use POST\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:296: (test) - - - - 8) test a live listener: what a refusal does to the connection an Origin refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:237 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:11 GMT\r\ncontent-length: 82\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Origin not allowed\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:244: (test) - -. -19:47:13.902 [info] beam_mcp: refused by host authorize/1: :nope - -19:47:13.906 [error] ** (Bandit.HTTPError) Unable to read remaining data in request body - - - 9) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:300 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:47:12 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:316: (test) - -. -Finished in 7.6 seconds (0.9s async, 6.7s sync) -158 tests, 9 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.Md2.txt b/slices/003-release-0-3-1/logs/mutation-round3.Md2.txt deleted file mode 100644 index b2bfc0cb..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.Md2.txt +++ /dev/null @@ -1,600 +0,0 @@ -Md2 applied -=== Md2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:47:14.661928430 -0400 -@@ -225,7 +225,7 @@ - # `with/else` cannot see bindings made inside the `with`, so an earlier version - # answered on the pre-`read_body` conn and Bandit framed the next request's bytes as - # this one's unread body. Size-dependent, so every small test passed. -- {:refused, conn, status, payload} -> send_json(conn, status, payload) -+ {:refused, conn, status, payload} -> send_json(close_after(conn), status, payload) - end - end - -@@ -278,10 +278,7 @@ - read_body_bounded(conn) - end - -- case result do -- {:refused, conn, status, payload} -> {:refused, close_after(conn), status, payload} -- ok -> ok -- end -+ result - end - - # Answering a crash must not itself crash: the payload is a constant, so there is nothing -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Md2: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 254639, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ - - 1) test the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:576 - Assertion with == failed - code: assert Plug.Conn.get_resp_header(parse_error, "connection") == [] - left: ["close"] - right: [] - stacktrace: - test/beam_mcp/readme_claims_test.exs:599: (test) - - -19:47:15.424 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -19:47:15.644 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:47:15.753 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1042: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:15.754 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:47:15.858 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:15.858 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:47:15.864 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:15.865 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -19:47:15.866 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:15.866 [info] beam_mcp: refused by host authorize/1: :nope -...... -19:47:15.919 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -19:47:16.022 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:47:16.030 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:692: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:16.030 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -19:47:16.031 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:16.031 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:16.031 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:16.031 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -19:47:16.135 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:47:16.147 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -19:47:17.137 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:47:17.143 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -19:47:17.208 [info] beam_mcp: refused by host authorize/1: :nope -. - - 2) test a live listener: what a refusal does to the connection a refusal AFTER the body has been read keeps the connection (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:200 - Assertion with == failed - code: assert responses(bytes) == 2 - left: 1 - right: 2 - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:213: (test) - - -19:47:17.214 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 2.6 seconds (0.8s async, 1.7s sync) -158 tests, 2 failures -TEST_EXIT=2 -Md2 applied -=== Md2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:47:17.957529324 -0400 -@@ -225,7 +225,7 @@ - # `with/else` cannot see bindings made inside the `with`, so an earlier version - # answered on the pre-`read_body` conn and Bandit framed the next request's bytes as - # this one's unread body. Size-dependent, so every small test passed. -- {:refused, conn, status, payload} -> send_json(conn, status, payload) -+ {:refused, conn, status, payload} -> send_json(close_after(conn), status, payload) - end - end - -@@ -278,10 +278,7 @@ - read_body_bounded(conn) - end - -- case result do -- {:refused, conn, status, payload} -> {:refused, close_after(conn), status, payload} -- ok -> ok -- end -+ result - end - - # Answering a crash must not itself crash: the payload is a constant, so there is nothing -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Md2: suite === -Running ExUnit with seed: 289100, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -19:47:18.436 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... - - 1) test the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:576 - Assertion with == failed - code: assert Plug.Conn.get_resp_header(parse_error, "connection") == [] - left: ["close"] - right: [] - stacktrace: - test/beam_mcp/readme_claims_test.exs:599: (test) - -................. -19:47:18.638 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:18.639 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:18.639 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:18.696 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:18.697 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:18.697 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:18.697 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:18.697 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:18.700 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -19:47:18.805 [info] beam_mcp: refused by host authorize/1: :nope -........ -19:47:18.857 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:47:18.863 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:691: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:47:18.915 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:18.922 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:692: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:643: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:588: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:549: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:47:18.931 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1042: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:47:18.983 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1012: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:930: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:18.983 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -19:47:18.984 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -19:47:19.035 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............................. -19:47:20.850 [info] beam_mcp: refused by host authorize/1: :nope -. -19:47:20.853 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:47:20.909 [info] beam_mcp: refused by host authorize/1: :nope -. - - 2) test a live listener: what a refusal does to the connection a refusal AFTER the body has been read keeps the connection (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:200 - Assertion with == failed - code: assert responses(bytes) == 2 - left: 1 - right: 2 - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:213: (test) - -.. -19:47:20.928 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:985: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:352: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 2.6 seconds (0.8s async, 1.7s sync) -158 tests, 2 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.Mr1.txt b/slices/003-release-0-3-1/logs/mutation-round3.Mr1.txt deleted file mode 100644 index 60226d46..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.Mr1.txt +++ /dev/null @@ -1,628 +0,0 @@ -Mr1 applied -=== Mr1: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:47:20.978985498 -0400 -@@ -749,7 +749,7 @@ - # from the schema, and judging it on the caller's VALUE instead would make a caller who - # sends the wrong shape into a host fault — the wrong side of the trust boundary, which is - # the mistake this check exists to stop making in the other direction. -- @annotatable_types ~w(string integer boolean) -+ @annotatable_types ~w(string integer boolean number object array) - - # TWO MUSTs, ONE DERIVATION. Both are decided from the schema and neither from the request, - # so the verdict on a tool is the same whatever the caller sends -- which is the test in -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mr1: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 410868, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... - - 1) test the HTTP transport's README claims a forbidden x-mcp-header annotation is the host's fault, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:533 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/readme_claims_test.exs:566: (test) - -........ -19:47:21.730 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:21.744 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -19:47:21.796 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -19:47:21.853 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 2) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1466 - a schema the specification forbids is the host's bug. Refusing the caller with 400 tells them to fix a header they wrote correctly, and no header they can write will ever satisfy it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1481: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1478: (test) - -....... -19:47:21.861 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... - - 3) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1513 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1519: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1516: (test) - -...... -19:47:21.923 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. - - 4) test an x-mcp-header annotation the specification forbids is the host's fault the refusal does not depend on the caller sending the header (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1503 - Assertion with == failed - code: assert post(call_body(%{"ratio" => 1.5}), call_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1508: (test) - -................. -19:47:22.086 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -19:47:22.086 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:22.087 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:22.087 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:22.087 [info] beam_mcp: refused by host authorize/1: :nope -....... -19:47:22.139 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:22.191 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:22.191 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:22.192 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:22.197 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:22.197 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -19:47:22.252 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1045: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:22.252 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -19:47:23.260 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -19:47:23.314 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:47:24.026 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -19:47:24.738 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.2 seconds (0.8s async, 2.4s sync) -158 tests, 4 failures -TEST_EXIT=2 -Mr1 applied -=== Mr1: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:47:24.778071560 -0400 -@@ -749,7 +749,7 @@ - # from the schema, and judging it on the caller's VALUE instead would make a caller who - # sends the wrong shape into a host fault — the wrong side of the trust boundary, which is - # the mistake this check exists to stop making in the other direction. -- @annotatable_types ~w(string integer boolean) -+ @annotatable_types ~w(string integer boolean number object array) - - # TWO MUSTs, ONE DERIVATION. Both are decided from the schema and neither from the request, - # so the verdict on a tool is the same whatever the caller sends -- which is the test in -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mr1: suite === -Running ExUnit with seed: 161488, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... - - 1) test the HTTP transport's README claims a forbidden x-mcp-header annotation is the host's fault, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:533 - Assertion with == failed - code: assert conn.status == 500 - left: 200 - right: 500 - stacktrace: - test/beam_mcp/readme_claims_test.exs:566: (test) - -.................... -19:47:25.532 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:25.534 [info] beam_mcp: refused by host authorize/1: :nope -... -19:47:25.639 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:25.639 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:25.640 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 2) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1466 - a schema the specification forbids is the host's bug. Refusing the caller with 400 tells them to fix a header they wrote correctly, and no header they can write will ever satisfy it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1481: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1478: (test) - -.... -19:47:25.642 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -19:47:25.745 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -19:47:25.797 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -19:47:25.799 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:25.802 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1045: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:25.807 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:25.807 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -19:47:25.812 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -19:47:25.812 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:47:25.813 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... - - 3) test an x-mcp-header annotation the specification forbids is the host's fault the refusal does not depend on the caller sending the header (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1503 - Assertion with == failed - code: assert post(call_body(%{"ratio" => 1.5}), call_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1508: (test) - -. - - 4) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1513 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1519: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1516: (test) - - -19:47:25.814 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -19:47:25.815 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:25.815 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:25.816 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -19:47:26.970 [info] beam_mcp: refused by host authorize/1: :nope -. -19:47:26.977 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -19:47:27.697 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -19:47:28.483 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.2 seconds (0.8s async, 2.4s sync) -158 tests, 4 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.Mr2.txt b/slices/003-release-0-3-1/logs/mutation-round3.Mr2.txt deleted file mode 100644 index 8276dbbf..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.Mr2.txt +++ /dev/null @@ -1,610 +0,0 @@ -Mr2 applied -=== Mr2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:47:28.533595116 -0400 -@@ -790,7 +790,7 @@ - defp check_annotation_uniqueness(tool, entries) do - collisions = - entries -- |> Enum.group_by(fn {name, _path, _type} -> String.downcase(name) end) -+ |> Enum.group_by(fn {name, _path, _type} -> name end) - |> Enum.filter(fn {_folded, group} -> length(group) > 1 end) - - case collisions do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mr2: suite === -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 978653, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -19:47:29.184 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -19:47:29.314 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...................... -19:47:29.525 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:29.525 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:29.525 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:29.526 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:29.582 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -19:47:29.589 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - - - 1) test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1666 - Assertion with == failed - code: assert post(body, collide_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1673: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1672: (test) - -.... -19:47:29.595 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:29.595 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:29.596 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... - - 2) test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1629 - one header cannot mirror two properties. Enforcing both against it refuses a caller who wrote the header exactly as tools/list advertised, and enforcing one of them serves a weaker contract than was advertised. The definition is invalid and the host is the party who can fix it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1647: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1639: (test) - -........ -19:47:29.655 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:29.655 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -19:47:29.655 [info] beam_mcp: refused by host authorize/1: :nope -. -19:47:29.713 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:29.714 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. - - 3) test x-mcp-header values MUST be case-insensitively unique (SCR-275) a nested annotation colliding with an outer one is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1681 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1686: (test) - - -19:47:29.718 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:47:29.719 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -19:47:29.825 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1045: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:29.825 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -19:47:30.822 [info] beam_mcp: refused by host authorize/1: :nope -. -19:47:30.826 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -19:47:31.534 [info] beam_mcp: refused by host authorize/1: :nope -.... -19:47:32.260 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.2 seconds (0.8s async, 2.4s sync) -158 tests, 3 failures -TEST_EXIT=2 -Mr2 applied -=== Mr2: diff against pristine, proving the mutation applied === ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/release-003/http.ex.pristine 2026-09-07 19:46:20.005437301 -0400 -+++ /home/aylac/Projects/beam_mcp-wt/003-release-0-3-1/lib/beam_mcp/transport/http.ex 2026-09-07 19:47:32.295576408 -0400 -@@ -790,7 +790,7 @@ - defp check_annotation_uniqueness(tool, entries) do - collisions = - entries -- |> Enum.group_by(fn {name, _path, _type} -> String.downcase(name) end) -+ |> Enum.group_by(fn {name, _path, _type} -> name end) - |> Enum.filter(fn {_folded, group} -> length(group) > 1 end) - - case collisions do -(diff exit 1 -- 1 means the files differ, i.e. the mutation is on disk) -=== Mr2: suite === -Running ExUnit with seed: 649048, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -19:47:32.836 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -19:47:33.012 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - - - 1) test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1629 - one header cannot mirror two properties. Enforcing both against it refuses a caller who wrote the header exactly as tools/list advertised, and enforcing one of them serves a weaker contract than was advertised. The definition is invalid and the host is the party who can fix it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1647: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1639: (test) - -....... -19:47:33.064 [info] beam_mcp: refused by host authorize/1: :nope -.. -19:47:33.115 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -19:47:33.122 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:695: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -19:47:33.175 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:33.175 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:33.175 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:33.176 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1284: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1285: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... - - 2) test x-mcp-header values MUST be case-insensitively unique (SCR-275) a nested annotation colliding with an outer one is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1681 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1686: (test) - -........ -19:47:33.239 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1045: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:33.243 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -19:47:33.302 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:33.303 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:33.303 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1295: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1298: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:33.304 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:47:33.304 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1015: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:933: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -19:47:33.304 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -19:47:33.355 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:47:33.361 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:694: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:47:33.413 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. - - 3) test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1666 - Assertion with == failed - code: assert post(body, collide_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1673: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1672: (test) - -....................... -19:47:34.479 [info] beam_mcp: refused by host authorize/1: :nope -. -19:47:34.483 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -19:47:34.489 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:988: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -19:47:35.982 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -158 tests, 3 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/mutation-round3.txt b/slices/003-release-0-3-1/logs/mutation-round3.txt deleted file mode 100644 index 8df0a00b..00000000 --- a/slices/003-release-0-3-1/logs/mutation-round3.txt +++ /dev/null @@ -1,31 +0,0 @@ -### EVERY MUTANT IN THIS SLICE, RE-SCORED ON THE TREE THAT SHIPS, TWICE. -### -### Slice 002 round 7's blocker was a table headed 'on the tree that ships' whose scoring -### run was a smaller tree. This is that table, produced by the run shown below rather than -### carried forward from the round each mutant was first scored in. -### -### TWICE, and that is not belt and braces. The first attempt at this table scored Mc2 as -### KILLED. It is a SURVIVOR: a 700 ms first-byte window in the Bandit harness expired -### under the load of the scoring loop itself, the 9 MB test failed on an empty buffer, and -### a surviving mutant read as killed. A flake that makes a table read all-killed is the -### failure this whole exercise exists to catch, so the harness was fixed (a generous -### first-byte timeout, a short quiet window after data starts) and the set is run twice to -### show the numbers are the code's and not the machine's. -### -### Each mutant's own log holds its diff against the pristine file, so every one is shown -### applied rather than reported applied. applied=1 below is that diff's presence. -### Command, per mutant: $S/mut.sh - -HEAD: 11e0b7a9a680729ea402fd463fea57e055b1a2bb -tree: c504d36db97a22bc745c157c7d2e68e3d98479a4 (working tree also carries the harness fix above) - -mutant applied pass 1 pass 2 -M13rev 1 158 tests, 1 failure TEST_EXIT=2 158 tests, 1 failure TEST_EXIT=2 -M2always 1 158 tests, 1 failure TEST_EXIT=2 158 tests, 1 failure TEST_EXIT=2 -M2never 1 158 tests, 0 failures TEST_EXIT=0 158 tests, 0 failures TEST_EXIT=0 -Mc2 1 158 tests, 0 failures TEST_EXIT=0 158 tests, 0 failures TEST_EXIT=0 -Mc3 1 158 tests, 2 failures TEST_EXIT=2 158 tests, 2 failures TEST_EXIT=2 -Md1 1 158 tests, 9 failures TEST_EXIT=2 158 tests, 9 failures TEST_EXIT=2 -Md2 1 158 tests, 2 failures TEST_EXIT=2 158 tests, 2 failures TEST_EXIT=2 -Mr1 1 158 tests, 4 failures TEST_EXIT=2 158 tests, 4 failures TEST_EXIT=2 -Mr2 1 158 tests, 3 failures TEST_EXIT=2 158 tests, 3 failures TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt b/slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt deleted file mode 100644 index e314686a..00000000 --- a/slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt +++ /dev/null @@ -1,15 +0,0 @@ -== a refused request whose body EXCEEDS bandit's 8_000_000-byte drain cap == - -19:21:57.150 [info] beam_mcp: refused by host authorize/1: :nope - -19:21:57.177 [error] ** (Bandit.HTTPError) Unable to read remaining data in request body - authorize 403, 9000160-byte body responses=1 socket=closed - -== a refused request that DECLARES more body than it sends (a slow/truncated client) == - -19:21:57.184 [info] beam_mcp: refused by host authorize/1: :nope - authorize 403, declares +5MB, sends 160 responses=1 socket=open - -== control: an ordinary 200, complete body == - 200, two pipelined responses=2 socket=open -PROBE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/probe-d-bandit-drain.txt b/slices/003-release-0-3-1/logs/probe-d-bandit-drain.txt deleted file mode 100644 index 3f066e7c..00000000 --- a/slices/003-release-0-3-1/logs/probe-d-bandit-drain.txt +++ /dev/null @@ -1,30 +0,0 @@ -bandit 1.12.5 thousand_island 1.5.0 - -== unread request body pad = 0 bytes == - -19:19:34.107 [info] beam_mcp: refused by host authorize/1: :nope - -19:19:34.113 [info] beam_mcp: refused by host authorize/1: :nope - authorize 403 (pre-read refusal) responses=2 connection-close=false - 200 control responses=2 connection-close=false - 405 (PUT, pre-read refusal) responses=2 connection-close=false - -== unread request body pad = 100000 bytes == - -19:19:36.546 [info] beam_mcp: refused by host authorize/1: :nope - -19:19:36.547 [info] beam_mcp: refused by host authorize/1: :nope - authorize 403 (pre-read refusal) responses=2 connection-close=false - 200 control responses=2 connection-close=false - 405 (PUT, pre-read refusal) responses=2 connection-close=false - -== unread request body pad = 1000000 bytes == - -19:19:38.980 [info] beam_mcp: refused by host authorize/1: :nope - -19:19:39.024 [info] beam_mcp: refused by host authorize/1: :nope - authorize 403 (pre-read refusal) responses=2 connection-close=false - 200 control responses=2 connection-close=false - 405 (PUT, pre-read refusal) responses=2 connection-close=false - -PROBE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/probe-d-large-body-reset.txt b/slices/003-release-0-3-1/logs/probe-d-large-body-reset.txt deleted file mode 100644 index f9c06b05..00000000 --- a/slices/003-release-0-3-1/logs/probe-d-large-body-reset.txt +++ /dev/null @@ -1,45 +0,0 @@ - -19:45:34.717 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.724 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.724 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.725 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.725 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.726 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.726 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.726 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.726 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.726 [info] beam_mcp: refused by host authorize/1: :nope -pad=0 bytes, 10 runs: - 10x response=403 recv_ended=:closed send=:ok - -19:45:34.778 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.833 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.880 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.930 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:34.983 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:35.042 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:35.091 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:35.138 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:35.186 [info] beam_mcp: refused by host authorize/1: :nope - -19:45:35.234 [info] beam_mcp: refused by host authorize/1: :nope -pad=9000000 bytes, 10 runs: - 10x response=403 recv_ended=:closed send=:ok -PROBE_EXIT=0 diff --git a/slices/003-release-0-3-1/logs/red-a-nonprimitive.txt b/slices/003-release-0-3-1/logs/red-a-nonprimitive.txt deleted file mode 100644 index 7e3e0d41..00000000 --- a/slices/003-release-0-3-1/logs/red-a-nonprimitive.txt +++ /dev/null @@ -1,246 +0,0 @@ -Running ExUnit with seed: 775916, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.... -18:36:02.104 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -18:36:02.106 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -18:36:02.114 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -18:36:02.166 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -18:36:02.221 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false - - - 1) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1462 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1468: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1465: (test) - -............ -18:36:02.273 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -18:36:02.277 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -18:36:02.284 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:36:02.284 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:36:02.284 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -18:36:02.285 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - -18:36:02.287 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 2) test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1415 - a schema the specification forbids is the host's bug. Refusing the caller with 400 tells them to fix a header they wrote correctly, and no header they can write will ever satisfy it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1430: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1427: (test) - -.. -18:36:02.287 [info] beam_mcp: refused by host authorize/1: :nope - - - 3) test an x-mcp-header annotation the specification forbids is the host's fault the refusal does not depend on the caller sending the header (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1452 - Assertion with == failed - code: assert post(call_body(%{"ratio" => 1.5}), call_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1457: (test) - -................... -18:36:02.505 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:583: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -18:36:02.506 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:36:02.506 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:36:02.506 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -18:36:02.558 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -Finished in 0.7 seconds (0.7s async, 0.00s sync) -85 tests, 3 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/red-b-collision.txt b/slices/003-release-0-3-1/logs/red-b-collision.txt deleted file mode 100644 index 5edd5722..00000000 --- a/slices/003-release-0-3-1/logs/red-b-collision.txt +++ /dev/null @@ -1,246 +0,0 @@ -Running ExUnit with seed: 173821, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.... -18:39:05.545 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -18:39:05.604 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:39:05.607 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. - - 1) test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1615 - Assertion with == failed - code: assert post(body, collide_headers([]), o).status == 500 - left: 400 - right: 500 - stacktrace: - test/beam_mcp/transport/http_test.exs:1622: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1621: (test) - -.. -18:39:05.615 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... - - 2) test x-mcp-header values MUST be case-insensitively unique (SCR-275) a nested annotation colliding with an outer one is the same fault (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1630 - Assertion with == failed - code: assert conn.status == 500 - left: 400 - right: 500 - stacktrace: - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1635: (test) - -... -18:39:05.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -18:39:05.670 [info] beam_mcp: refused by host authorize/1: :nope -. -18:39:05.728 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -18:39:05.732 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -18:39:05.784 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -18:39:05.784 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:39:05.784 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:39:05.784 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -18:39:05.943 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -18:39:05.943 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:39:05.944 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:875: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:793: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 3) test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1578 - one header cannot mirror two properties. Enforcing both against it refuses a caller who wrote the header exactly as tools/list advertised, and enforcing one of them serves a weaker contract than was advertised. The definition is invalid and the host is the party who can fix it. - code: ExUnit.CaptureLog.capture_log(fn -> - stacktrace: - test/beam_mcp/transport/http_test.exs:1596: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error"/1 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:121: ExUnit.CaptureLog.with_log/2 - (ex_unit 1.19.2) lib/ex_unit/capture_log.ex:83: ExUnit.CaptureLog.capture_log/2 - test/beam_mcp/transport/http_test.exs:1588: (test) - -......... -18:39:05.956 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -18:39:05.956 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:848: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -18:39:06.015 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -Finished in 0.8 seconds (0.8s async, 0.00s sync) -89 tests, 3 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/red-c-lost-id.txt b/slices/003-release-0-3-1/logs/red-c-lost-id.txt deleted file mode 100644 index 572590ed..00000000 --- a/slices/003-release-0-3-1/logs/red-c-lost-id.txt +++ /dev/null @@ -1,228 +0,0 @@ -Running ExUnit with seed: 573889, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.... -19:11:28.023 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -19:11:28.077 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:11:28.078 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:11:28.078 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -19:11:28.132 [info] beam_mcp: refused by host authorize/1: :nope -... -19:11:28.192 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:11:28.193 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -19:11:28.195 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -19:11:28.199 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:590: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:11:28.199 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -19:11:28.200 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -19:11:28.200 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1287: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1290: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -19:11:28.303 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -19:11:28.308 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:955: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -19:11:28.370 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:898: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:11:28.473 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1276: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1277: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -19:11:28.474 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:925: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:843: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -19:11:28.530 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -19:11:28.538 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 1) test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1161 - Assertion with == failed - code: assert body!(conn)["id"] == 4242 - left: nil - right: 4242 - stacktrace: - test/beam_mcp/transport/http_test.exs:1191: (test) - - -Finished in 0.9 seconds (0.9s async, 0.00s sync) -90 tests, 1 failure -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/red-d-connection-close.txt b/slices/003-release-0-3-1/logs/red-d-connection-close.txt deleted file mode 100644 index 7a10740e..00000000 --- a/slices/003-release-0-3-1/logs/red-d-connection-close.txt +++ /dev/null @@ -1,114 +0,0 @@ -Running ExUnit with seed: 341598, max_cases: 64 - -.. - - 1) test a live listener: what a refusal does to the connection a 405 ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:271 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 405 Method Not Allowed\r\ndate: Mon, 07 Sep 2026 23:23:35 GMT\r\ncontent-length: 97\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\nallow: POST\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Method not allowed: PUT; use POST\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:281: (test) - - -19:23:36.587 [info] beam_mcp: refused by host authorize/1: :nope - - - 2) test a live listener: what a refusal does to the connection an authorize refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:236 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:23:36 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:242: (test) - - -19:23:37.297 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:249: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:924: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - - - - 3) test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:246 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 500 Internal Server Error\r\ndate: Mon, 07 Sep 2026 23:23:36 GMT\r\ncontent-length: 78\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32603,\"message\":\"Internal error\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:254: (test) - - - - 4) test a live listener: what a refusal does to the connection an Origin refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:222 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:23:37 GMT\r\ncontent-length: 82\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Origin not allowed\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:229: (test) - -. -19:23:38.722 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - - - 5) test a live listener: what a refusal does to the connection an authorize breaking its contract ends the connection instead of draining (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:258 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:23:38 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:267: (test) - - -19:23:39.481 [info] beam_mcp: refused by host authorize/1: :nope - -19:23:39.484 [error] ** (Bandit.HTTPError) Unable to read remaining data in request body - - - 6) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:285 - Expected truthy, got false - code: assert closes?(bytes) - arguments: - - # 1 - "HTTP/1.1 403 Forbidden\r\ndate: Mon, 07 Sep 2026 23:23:39 GMT\r\ncontent-length: 73\r\nvary: accept-encoding\r\ncache-control: max-age=0, private, must-revalidate\r\ncontent-type: application/json; charset=utf-8\r\n\r\n{\"error\":{\"code\":-32600,\"message\":\"Forbidden\"},\"id\":null,\"jsonrpc\":\"2.0\"}" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:301: (test) - - -Finished in 5.1 seconds (0.00s async, 5.1s sync) -9 tests, 6 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/red-e-invalid-utf8.txt b/slices/003-release-0-3-1/logs/red-e-invalid-utf8.txt deleted file mode 100644 index 8aebc320..00000000 --- a/slices/003-release-0-3-1/logs/red-e-invalid-utf8.txt +++ /dev/null @@ -1,246 +0,0 @@ -Running ExUnit with seed: 538851, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.. -20:09:03.965 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1017: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:935: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -20:09:03.968 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1225: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -20:09:03.969 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1287: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1017: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:935: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1288: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -20:09:04.021 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:990: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -20:09:04.021 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1017: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:935: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -20:09:04.026 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:696: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:990: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -20:09:04.089 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:697: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:990: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -20:09:04.091 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -20:09:04.092 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<49, 46, 48, 45, 255, 254>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1328: BeamMCP.Transport.HTTPTest."test a header value that is not valid UTF-8 is refused, not reflected invalid UTF-8 in MCP-Protocol-Version is a 400 that reflects nothing"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:09:04.093 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1017: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:935: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:09:04.093 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1017: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:935: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:09:04.093 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - - - 1) test a header value that is not valid UTF-8 is refused, not reflected invalid UTF-8 in MCP-Protocol-Version is a 400 that reflects nothing (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1323 - Assertion with == failed - code: assert conn.status == 400 - left: 500 - right: 400 - stacktrace: - test/beam_mcp/transport/http_test.exs:1330: (test) - -............ -20:09:04.146 [info] beam_mcp: refused by host authorize/1: :nope -....... -20:09:04.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -20:09:04.402 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1298: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1017: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:935: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1301: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -20:09:04.403 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:990: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:09:04.404 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:990: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -20:09:04.404 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:990: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:355: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -20:09:04.461 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -20:09:04.466 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:696: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:990: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:646: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:591: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:552: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -Finished in 0.9 seconds (0.9s async, 0.00s sync) -92 tests, 1 failure -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/red-readme-claims.txt b/slices/003-release-0-3-1/logs/red-readme-claims.txt deleted file mode 100644 index eab7d8a9..00000000 --- a/slices/003-release-0-3-1/logs/red-readme-claims.txt +++ /dev/null @@ -1,28 +0,0 @@ -Running ExUnit with seed: 301433, max_cases: 64 - -............... - - 1) test the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:576 - the README no longer contains the sentence this test pins: - ends the connection, and says so - Either the claim moved and this test must move with it, or the claim was deleted and so should this test. A test pinning a sentence nobody makes is worse than no test, because it reads as coverage. - code: claims("ends the connection, and says so") - stacktrace: - test/beam_mcp/readme_claims_test.exs:581: (test) - -. - - 2) test the HTTP transport's README claims a forbidden x-mcp-header annotation is the host's fault, as the README now says (BeamMCP.ReadmeClaimsTest) - test/beam_mcp/readme_claims_test.exs:533 - the README no longer contains the sentence this test pins: - is the host's fault, not the caller's - Either the claim moved and this test must move with it, or the claim was deleted and so should this test. A test pinning a sentence nobody makes is worse than no test, because it reads as coverage. - code: claims("is the host's fault, not the caller's") - stacktrace: - test/beam_mcp/readme_claims_test.exs:537: (test) - -.. -Finished in 0.1 seconds (0.1s async, 0.00s sync) -20 tests, 2 failures -TEST_EXIT=2 diff --git a/slices/003-release-0-3-1/logs/round1.a.md b/slices/003-release-0-3-1/logs/round1.a.md deleted file mode 100644 index 94c04727..00000000 --- a/slices/003-release-0-3-1/logs/round1.a.md +++ /dev/null @@ -1,89 +0,0 @@ -# Round 1, lane a — correctness and anchors - -Tree read: `1d27f1a0cd3265f45cd7ef0ca64ea10f584f6e2a` (commit `b821818`). Pin: `round1.a.tree`. -Scope: `lib/beam_mcp/transport/http.ex` and `test/beam_mcp/transport/`, read as a pair. -Method: every anchor scored by mutation. No test was read and agreed with. - -**Verdict: changes required (one), and they are made. Two survivors recorded as survivors.** - -## Blocking - -**A1. A comment claimed more than had been measured.** `tool_annotations/2`'s comment said -`check_annotations/2` moved inside `host_call/1` "because ... a schema whose `properties` keys -are not strings raises in `Enum.join/2` there". Scored: - - Mc2 check_annotations/2 left OUTSIDE host_call/1, spec read and walk inside - SURVIVES 156 tests, 0 failures logs/mutation-c-Mc2.txt - -The mutant survives, and reading why shows the sentence is wrong as written: -`annotation_detail/1` -- the only place a property path is interpolated -- runs **only** on a -type offence or a name collision, so a non-`String.Chars` key alone raises nothing. Reaching the -raise needs such a key AND an offence, which no JSON-derived schema can produce. - -This is the class `CONVENTIONS.md` records under *"an archive reported as verbatim but never -fetched"*: a justification written to sound measured that nobody measured. It is the same defect -whether it appears in a record or in a code comment, and it appeared here in code written by -this slice. - -**Fixed** by rewriting the comment to say what the measurement says: that half of the move is -defensive rather than defect-driven, the mutant survives, and why. The move itself is kept -- -it is right on principle and costs nothing -- but it is no longer described as closing a defect. - -## Anchors scored - -Each mutant's diff against the pristine file is in its own log, so every one is shown applied -rather than reported applied. - -| mutant | what it does | result | log | -|---|---|---|---| -| `M13rev` | the (c) fix removed: spec read and walk back outside `host_call/1` | **KILLED** 147/1 | `mutation-c-M13rev.txt` | -| `M2always` | `fault_response/4` always re-raises (bodyless 500) | **KILLED** 147/1 | `mutation-c-M2always.txt` | -| `M2never` | `fault_response/4` never re-raises | SURVIVES 147/0 | `mutation-c-M2never.txt` | -| `Mc2` | `check_annotations/2` left outside `host_call/1` | SURVIVES 156/0 | `mutation-c-Mc2.txt` | -| `Mc3` | `mirrored_params/2` stops recognising the host-fault sentinel | **KILLED** 156/2 | `mutation-c-Mc3.txt` | -| `Md1` | the (d) fix removed: no pre-read refusal closes | **KILLED** 156/8 | `mutation-d-Md1.txt` | -| `Md2` | closes ALWAYS, every refusal rather than the pre-read set | **KILLED** 156/1 | `mutation-d-Md2.txt` | - -Counts are `tests/failures` as the run printed them; the differing totals are the tree growing -across the two commits (147 after (c), 156 after (d)), not a re-labelled run. - -`M13rev` and `Md1` had to remove what they orphaned -- `tool_annotations/2` and `close_after/1` -respectively -- or `--warnings-as-errors` would have failed the build before the suite ran and -the table would have recorded a kill no test made. Both mutation scripts assert the orphan is -gone before writing. - -`Md2` is the one that matters most for (d): it is killed by the post-read control alone. Without -that control the fix cannot be told from a server that closes on everything, which is a -different bug wearing the fix's clothes. - -## Read and accepted - -- **`ToolCatalog.fetch/2` not returning `{:ok, spec}` still yields `[]`.** `tool_annotations/2`'s - `with` has no `else`, so a `{:error, _}` falls out of it, out of `host_call/1`, and into - `mirrored_params/2`'s `_ -> []`. A tool the catalog does not have mirrors no parameters, which - is not a fault. Behaviour unchanged from before the move. -- **The invalid-annotation sentinel still reaches its own branch.** It is returned by - `check_annotations/2`, passes through `host_call/1` untouched, fails to match - `{:ok, entries}`, and is matched by tag in the `else`. `Mc3` proves the sibling host-fault - clause is load-bearing; the (a) and (b) tests from earlier in the slice cover this one. -- **`before_body/2`'s `ok -> ok` catch-all.** An unexpected return from a step passes through to - `handle/2`'s `with`, matches neither the `do` pattern nor the `else` clause, and raises - `WithClauseError` into `call/2`'s rescue -- a 500 inside the envelope. Identical to the - behaviour before the split. -- **The 405 keeps its `allow: POST` header through the close.** `check_method/1` builds the - refusal on a conn that already carries it and `close_after/1` adds to that conn. Asserted. - -## Filed, not blocking - -**A2. `read_body_bounded/1`'s `{:error, reason}` 400 has no test at all**, and now carries the -new close behaviour untested with it. Derived: `grep -rn "Could not read request body" test/ lib/` -returns one hit and it is the source line. Pre-existing; `Plug.Test`'s `read_body/2` is a -`:binary.part` and cannot return `{:error, _}`, and Bandit raises rather than returning it for -the malformed framings tried here. Recorded so the next reader does not have to rediscover that -the branch is dark. - -**A3. A bodyless non-POST now costs a connection.** A `GET /mcp` -- the shape a monitor or a -probe sends -- leaves nothing unread, so closing on it buys nothing and costs a handshake. The -alternative is deciding per request whether the body was consumed, which reintroduces exactly the -per-site reasoning that left five of six sites unfixed. The trade is deliberate: uniformity at -the split, at the cost of one connection per rejected non-POST. diff --git a/slices/003-release-0-3-1/logs/round1.a.tree b/slices/003-release-0-3-1/logs/round1.a.tree deleted file mode 100644 index c4736146..00000000 --- a/slices/003-release-0-3-1/logs/round1.a.tree +++ /dev/null @@ -1,11 +0,0 @@ -1d27f1a0cd3265f45cd7ef0ca64ea10f584f6e2a -# tree of commit b821818, written by: git rev-parse 'b821818^{tree}' -# -# THIS IS THE TREE LANE a READ. The working tree has since moved: lane a's own finding -# (an overstated comment on tool_annotations/2, see round1.a.md) was corrected after the -# read, so a diff run now shows that correction and nothing else. Recorded rather than -# claimed clean: -# $ git diff b821818 --stat -- lib test -# lib/beam_mcp/transport/http.ex | 14 +++++++++++--- -# 1 file changed, 11 insertions(+), 3 deletions(-) -# HEAD at read time: b82181892363d2029d73aa723c1309e13a880e19 diff --git a/slices/003-release-0-3-1/logs/round1.b.md b/slices/003-release-0-3-1/logs/round1.b.md deleted file mode 100644 index f72cd56a..00000000 --- a/slices/003-release-0-3-1/logs/round1.b.md +++ /dev/null @@ -1,85 +0,0 @@ -# Round 1, lane b — the shipped artefact, and the record - -Tree read: `1d27f1a0cd3265f45cd7ef0ca64ea10f584f6e2a` (commit `b821818`). Pin: `round1.b.tree`. -Scope: the two commit messages on this branch, every log they cite, `README.md`, `CHANGELOG.md`, -`mix.exs`, `HANDOFF.md`. Method: every population claim re-derived by running the command the -record says produced it, rather than reading the claim. - -**Verdict: changes required (two), and they are made.** - -## Blocking - -**B1. The site count is wrong, in three places, and in the direction that hides a site.** The -(d) commit message, `before_body/2`'s comment and `http_bandit_test.exs`'s comment all say - -> SIX refusal sites sit at or before the read -- the Origin 403, the 405, `authorize/1`'s 500, -> its 403 and its contract-violation 403, and `read_body_bounded/1`'s own 400 -- and only the -> 413 called `close_after/1` for itself. - -The sentence names six and then names a seventh. Re-derived: - - $ grep -n '{:refused,' lib/beam_mcp/transport/http.ex -> 14 hits - -of which three are not sites (the comment quoting itself, `handle/2`'s `else`, and -`before_body/2`'s own close), four are on the far side of the body read (three in `decode/2`, -one in `check_headers/3`), and **seven** are at or before it: the Origin 403, the 405, -`authorize/1`'s 500 / 403 / contract-violation 403, and `read_body_bounded/1`'s **413 and 400**. -One of the seven already closed. Six did not. - -The fix ships the right behaviour -- all seven go out through one path -- so this is a record -defect, not a code defect. It is blocking anyway: an off-by-one in the population is the exact -shape of the defect the commit claims to have fixed, and a reader checking the work against the -sentence would conclude the 413 was outside the set. - -**Fixed** in `before_body/2`'s comment, in `read_body_bounded/1`'s comment and in the test file. -The (d) commit message is not rewritten -- corrections are appended, never rewritten -- so the -correction is recorded in `FINDINGS.md` and carried by the code. - -**B2. The derivation command no longer finds the thing it was published to find.** The record -quotes - - $ grep -n '<- check_origin\|<- check_method\|<- authorize\|<- read_body_bounded' \ - lib/beam_mcp/transport/http.ex - -as the command that shows where the body read sits among the steps. Run on the shipping tree it -returns the three checks and **not** `read_body_bounded`, because the fix moved that call out of -the `with` clause list and into the `with` body, where there is no `<-`. A derivation that -cannot see the boundary it defines is not a derivation, and this one was true only of the tree -it was written against. - -**Fixed**: the published derivation is now - - $ grep -n 'defp before_body' -A 10 lib/beam_mcp/transport/http.ex - $ grep -n '{:refused,' lib/beam_mcp/transport/http.ex - -The first shows the steps *and* the read; the second lists the sites to place against them. -Re-run on the shipping tree, the first returns the function body including -`read_body_bounded(conn)`. Both greps also match the comment that quotes them, and the comment -now says so -- the same self-match slice 002 recorded and this comment reproduced. - -## Read and accepted - -- **No tool-attribution trailers, no board identifiers.** Derived: - `git log c54046a..HEAD --format='%H%n%B' | grep -niE 'co-authored|claude|generated with|SCR-[0-9]+'` - returns no hits. `c54046a`, which carries `(SCR-275)`, is inherited from before this work and - was not propagated. -- **Both commits carry `Signed-off-by: Ayla Croft `**, from - `git log --format='%h %(trailers:key=Signed-off-by,valueonly)'`. -- **Every count quoted in a commit message is the count in the log it cites.** Checked - mechanically against the nine cited logs; all nine match on both the test line and - `TEST_EXIT`. Two totals differ between the commits (147 and 156) and that is the tree growing, - not a re-labelled run -- the failure slice 002 round 7 recorded. -- **The archives are whole.** Each was written by `{ cmd; echo EXIT=$?; } 2>&1 | tee `, so - the file holds the run's own bytes including its stderr and its exit code. Nothing was piped - through `grep` into a log; where output was filtered for reading, the filter ran on `tee`'s - stdout and not on the file. - -## Filed, not blocking - -**B3. `README.md`, `CHANGELOG.md`, `mix.exs` and `HANDOFF.md` are all still at `0.3.0` and -describe none of this slice's behaviour.** Expected at this point -- the plan puts them in one -release commit, which is deliberate because that is the commit that makes their statements true --- and named here so that if this round were the last thing that happened, the next reader knows -they are outstanding rather than overlooked. `HANDOFF.md` additionally still says -`Version 0.3.0, unreleased` and names branch head `bdb032f`, both stale on `main` before this -slice began. diff --git a/slices/003-release-0-3-1/logs/round1.b.tree b/slices/003-release-0-3-1/logs/round1.b.tree deleted file mode 100644 index 51c1bdee..00000000 --- a/slices/003-release-0-3-1/logs/round1.b.tree +++ /dev/null @@ -1,7 +0,0 @@ -1d27f1a0cd3265f45cd7ef0ca64ea10f584f6e2a -# tree of commit b821818, written by: git rev-parse 'b821818^{tree}' -# -# THIS IS THE TREE LANE b READ -- the same tree lane a read, before either lane's fixes -# were applied. Lane b additionally read the two commit messages c54046a..b821818 and every -# log under slices/003-release-0-3-1/logs/ as of that commit. -# HEAD at read time: b82181892363d2029d73aa723c1309e13a880e19 diff --git a/slices/003-release-0-3-1/logs/round2.a.md b/slices/003-release-0-3-1/logs/round2.a.md deleted file mode 100644 index 4b4d259b..00000000 --- a/slices/003-release-0-3-1/logs/round2.a.md +++ /dev/null @@ -1,57 +0,0 @@ -# Round 2, lane a — correctness and anchors, on the release commit - -Tree read: `bae1fcaeb73b2146bf8b1ee49b79bd1bcd817988` (commit `8c296d8`). Pin: `round2.a.tree`. -Scope: the release commit's two new README-claim tests, plus a re-score of the anchors round 1 -established, all on the tree that now ships. - -**Verdict: no changes required.** - -## The question this lane exists to answer - -A README-claim test can be two things that look identical to a passing suite: an anchor, or a -quotation with an assertion stapled to it. The plan for this slice says each new claim gets a -test that quotes the sentence **and** exercises the behaviour, precisely because a quote-only pin -catches a sentence that moves and misses a sentence that becomes false. So the test is not read -and agreed with; it is scored. - -| mutant | what it does | result | log | -|---|---|---|---| -| `Mr1` | `@annotatable_types` widened to admit `number`, `object`, `array` -- the (a) defect, restored | **KILLED** 158/4 | `mutation-r-Mr1.txt` | -| `Mr2` | uniqueness grouped by the original name, not the case-folded one -- the (b) defect, restored in the shape that looks most like a tidy-up | **KILLED** 158/3 | `mutation-r-Mr2.txt` | - -`Mr1`'s four kills include **the new README-claim test itself**: - - 1) test the HTTP transport's README claims a forbidden x-mcp-header annotation is the - host's fault, as the README now says - 2) test ... an annotated `number` property is answered as a host fault, not as the caller's - error - 3) test ... the refusal does not depend on the caller sending the header - 4) test ... an annotated `object` property is the same fault - -So the claim is anchored by behaviour and not only by its own quotation. The second new claim -- -the pre-read `connection: close` -- is anchored by `Md1` from round 1, which killed eight tests -including the Plug.Test header assertion the README test makes; it is not re-scored here because -nothing between the two rounds touched that path. - -`Mr2` is worth naming as a shape rather than a mutant. Grouping by the original name instead of -the case-folded one is not a random perturbation; it is the edit a reader who has forgotten why -the fold is there would make while tidying, and it silently restores the defect the fold exists -to prevent. It dies on three tests. - -## Read and accepted - -- **`refute conn.resp_body =~ "number"` is a real assertion, not a tautology.** The refusal body - is the constant `{"error":{"code":-32603,"message":"Internal error"},"id":1,"jsonrpc":"2.0"}`, - and the diagnosis that *does* name `ratio`, `"number"` and `"Ratio"` goes to the log -- visible - in the green run's captured output. If the detail were interpolated into the response instead, - all three refutes fail. That is the "nothing about it reaches the caller" half, which a status - check alone would miss. -- **`http_request/3` does not weaken `http_post_body/1`.** The size-sweep helper is left as it - was, because the cap tests quote it and folding the two would make those read worse. Two - helpers with two jobs, not one helper with a flag. -- **The version bump itself is not pinned by any test, and cannot honestly be.** No assertion can - say "the version was raised in this commit" without hardcoding the version, which is the string - grep `CONVENTIONS.md` says finds only what you already thought of. What *is* pinned is the - relationship: `readme_claims_test.exs` derives the next break from `mix.exs` and refutes every - requirement the README offers against it, so the pin and the version stay consistent whichever - one moves. diff --git a/slices/003-release-0-3-1/logs/round2.a.tree b/slices/003-release-0-3-1/logs/round2.a.tree deleted file mode 100644 index 156a74fc..00000000 --- a/slices/003-release-0-3-1/logs/round2.a.tree +++ /dev/null @@ -1,5 +0,0 @@ -bae1fcaeb73b2146bf8b1ee49b79bd1bcd817988 -# tree of commit 8c296d8, the release commit, written by: git rev-parse '8c296d8^{tree}' -# THIS IS THE TREE ROUND 2 LANE a READ. Round 2's own fixes were applied after the read; -# a diff run later shows those and nothing else. -# HEAD at read time: 8c296d85a96d9d1f0c67eb2c120d71580526e5bb diff --git a/slices/003-release-0-3-1/logs/round2.b.md b/slices/003-release-0-3-1/logs/round2.b.md deleted file mode 100644 index 6ad96e7f..00000000 --- a/slices/003-release-0-3-1/logs/round2.b.md +++ /dev/null @@ -1,72 +0,0 @@ -# Round 2, lane b — the shipped artefact as a consumer meets it - -Tree read: `bae1fcaeb73b2146bf8b1ee49b79bd1bcd817988` (commit `8c296d8`). Pin: `round2.b.tree`. -Scope: `README.md`, `CHANGELOG.md`, `mix.exs`, `HANDOFF.md`, read as a consumer and as a reader -of the record rather than as a diff. Method: every quoted measurement checked against the log it -came from; every path checked for whether it resolves from where the file will be read. - -**Verdict: changes required (three), and they are made.** - -## Blocking - -**B4. `HANDOFF.md` claimed a review that had not happened.** Its opening line read - -> Two review rounds complete at the time this was written, with a third to close on the release -> commit itself. - -One was complete. The second was this one, and it had not started when the sentence was written. -`CONVENTIONS.md` names a fabricated verification claim as the worst member of its family -specifically because it appears inside the artefact offered as proof, and a handoff is exactly -that artefact: it is the file the next reader trusts for how much review the work had. - -**Fixed** by deleting the summary rather than correcting the number. The round table in -`FINDINGS.md` is written as each round closes and is now named as the answer, so there is one -place that can be right instead of two that can disagree. - -**B5. The changelog cited slice records without saying they do not ship.** `CHANGELOG.md` is in -`mix.exs`'s `files:` and is an ex_doc extra, so it is read from inside the tarball and on -hexdocs, where `slices/003-release-0-3-1/…` resolves to nothing. Commit `a01e68d` fixed exactly -this for the previous release and established the form: the full repository-relative path plus a -statement that slice records are not shipped. The new section used the path and dropped the -statement. - -**Fixed**, once for the section rather than once per reference. - -**B6. A quoted table was abridged.** The changelog showed three columns of a six-column -measurement: - - requirement 0.3.0 0.3.1 0.4.0 - ~> 0.3.0 true true false - -The numbers were right and the abridgement was in the flattering direction -- it dropped the -columns that do not bear on this release. `CONVENTIONS.md`'s derivation for the verbatim-archive -rule is a set of eight hand-copied verdicts of which **four were abridged**, and this is that -shape at small scale, in the file a consumer reads. **Fixed**: the whole row, all six columns, as -the run printed it, with the extract-versus-quotation distinction stated. - -## Read and accepted - -- **The README's version recommendation is right and does not move.** `~> 0.3.0` admits `0.3.1` - and refuses `0.4.0`. Measured, not recalled. `readme_claims_test.exs` re-derives the next break - from `mix.exs` at `0.3.1` and both requirement tests pass, so the policy is still encoded - rather than restated. -- **`0.3.0`'s changelog section is not amended.** `git diff main..HEAD -- CHANGELOG.md` touches - only the inserted `[0.3.1]` section. -- **`[0.3.1]` is headed `unreleased`**, which is correct until the owner dates it at tag time, - and the handoff's release steps say so. -- **`HANDOFF.md` and `slices/` are not in `files:`**, so nothing repository-only ships. -- **No head hash in the handoff.** The previous one named `bdb032f` and went stale immediately, - because a hash written into the file it describes cannot include the commit that writes it. - The commits are listed by subject and `git log main..` is named as the authority. This is a - small thing that has now cost two readers. - -## Also checked, and true - -- The changelog's count of pre-read refusal sites matches round 1's correction: six that did not - close plus the `413` that did. -- The README's `8 MB` is the adapter's `8_000_000`-byte cap, which is 8 MB decimal, and the - read-timeout claim resolves to the `15,000 ms under Bandit` already stated in the same section - and already pinned by `claims("15,000 ms under `Bandit`")`. -- The new README paragraph on `x-mcp-header` states the no-declared-type carve-out, which is the - scope limit the plan named and the code implements. Without it the paragraph would claim the - transport judges every annotation, which it does not. diff --git a/slices/003-release-0-3-1/logs/round2.b.tree b/slices/003-release-0-3-1/logs/round2.b.tree deleted file mode 100644 index 4d04f099..00000000 --- a/slices/003-release-0-3-1/logs/round2.b.tree +++ /dev/null @@ -1,5 +0,0 @@ -bae1fcaeb73b2146bf8b1ee49b79bd1bcd817988 -# tree of commit 8c296d8, the release commit, written by: git rev-parse '8c296d8^{tree}' -# THIS IS THE TREE ROUND 2 LANE b READ. Round 2's own fixes were applied after the read; -# a diff run later shows those and nothing else. -# HEAD at read time: 8c296d85a96d9d1f0c67eb2c120d71580526e5bb diff --git a/slices/003-release-0-3-1/logs/round3.a.md b/slices/003-release-0-3-1/logs/round3.a.md deleted file mode 100644 index 97a1fc23..00000000 --- a/slices/003-release-0-3-1/logs/round3.a.md +++ /dev/null @@ -1,83 +0,0 @@ -# Round 3, lane a — the mutation table on the tree that actually ships - -Tree read: `c504d36db97a22bc745c157c7d2e68e3d98479a4` (commit `11e0b7a`). Pin: `round3.a.tree`. -Scope: every mutant this slice has scored, re-run on the final tree; the Bandit harness itself. - -**Verdict: changes required (one), and it is made. It is the most important finding of the three -rounds.** - -## Blocking - -**C1. A flake made a SURVIVOR score as KILLED.** - -Slice 002 round 7's blocker was a mutation table headed "on the tree that ships" whose scoring -run was a smaller tree. Every mutant in this slice was first scored in the round that produced -it, at 147, 156 or 158 tests, so the same defect was available here. Re-running the whole set on -the final tree is the answer to it, and doing that is what surfaced this: - - Mc2 check_annotations/2 left outside host_call/1 - round 1, at 156 tests: SURVIVED 156 tests, 0 failures - first re-score, at 158 tests: "KILLED" 158 tests, 1 failure - -The failure was not the mutant. It was -`http_bandit_test.exs`'s 9 MB case, failing on an empty receive buffer: - - 1) test ... a refusal over the adapter's drain cap now announces the close it always did - code: assert String.contains?(bytes, "HTTP/1.1 403") - # 1 - "" - -`drain/2` used one 700 ms window for every read. Under the load of the scoring loop itself the -9 MB upload had not finished inside it, so the harness gave up before the server had said -anything and the test failed for a reason that had nothing to do with the code under test. - -**Why this is the sharpest finding in the slice.** `CONVENTIONS.md` says a survivor recorded as -a survivor is correct, and that a test written so the table reads all-killed is worse than the -survivor because it looks like evidence. A flaky harness produces that same false table without -anyone writing a dishonest test — the table simply reads better than the truth, in the direction -nobody checks. Had the second pass not been run, this slice's record would have claimed a -pinned check that is not pinned. - -**Fixed** in the harness, not by deleting the test: `drain/2` now waits generously -(`@first_byte_ms 10_000`) for the FIRST byte, which is bounded by how long the client takes to -finish writing, and only then uses the short quiet window (`@quiet_ms 700`) that distinguishes -"the server is holding this connection" from "the server is done". The control tests still pay -only the quiet window, because they receive immediately. - -**Demonstrated stable rather than declared fixed.** Ten consecutive runs of the Bandit file, -`logs/flake-check-bandit.txt`, `9 tests, 0 failures` ten times. And the full mutation set run -**twice** end to end, `logs/mutation-round3.txt`. - -## The table, on the tree that ships, run twice - - mutant applied pass 1 pass 2 - M13rev 1 158 tests, 1 failure 158 tests, 1 failure - M2always 1 158 tests, 1 failure 158 tests, 1 failure - M2never 1 158 tests, 0 failures 158 tests, 0 failures - Mc2 1 158 tests, 0 failures 158 tests, 0 failures - Mc3 1 158 tests, 2 failures 158 tests, 2 failures - Md1 1 158 tests, 9 failures 158 tests, 9 failures - Md2 1 158 tests, 2 failures 158 tests, 2 failures - Mr1 1 158 tests, 4 failures 158 tests, 4 failures - Mr2 1 158 tests, 3 failures 158 tests, 3 failures - -`applied=1` is the count of `+++` lines in that mutant's diff against the pristine file, which is -in its own log — so every mutant is shown applied rather than reported applied. `M13rev` and -`Md1` remove what they orphan (`tool_annotations/2` and `close_after/1`), because -`--warnings-as-errors` would otherwise fail the build before the suite ran and the table would -record a kill no test made. - -**Two survivors, both recorded as survivors with the argument, in `FINDINGS.md`:** `M2never` -(`fault_response/4`'s re-raise branch, scoped out by the owner) and `Mc2` (defensive rather than -defect-driven, and unreachable from any JSON-derived schema). - -**Md1 and Md2 both gained a failure** against their round-1 scores (8→9 and 1→2). The extra in -each is the release commit's new README-claim test, which is the rule working: a claim added to -the README in one commit is pinned by a test that dies with the behaviour. - -## Read and accepted - -- The 9 MB case is **not** RST-prone in the way it first appeared. Measured directly, ten runs - at each size, `logs/probe-d-large-body-reset.txt`: `pad=0` and `pad=9000000` both give - `10x response=403 recv_ended=:closed send=:ok`. The client gets its refusal and then the - close. The earlier empty buffer was the harness's window, not a reset. diff --git a/slices/003-release-0-3-1/logs/round3.a.tree b/slices/003-release-0-3-1/logs/round3.a.tree deleted file mode 100644 index 2f29c4ef..00000000 --- a/slices/003-release-0-3-1/logs/round3.a.tree +++ /dev/null @@ -1,5 +0,0 @@ -c504d36db97a22bc745c157c7d2e68e3d98479a4 -# tree of commit 11e0b7a, written by: git rev-parse '11e0b7a^{tree}' -# THIS IS THE TREE ROUND 3 LANE a READ. Round 3's own fixes -- the Bandit harness -# timeout and the two re-pointed mutation counts -- were applied after the read. -# HEAD at read time: 11e0b7a9a680729ea402fd463fea57e055b1a2bb diff --git a/slices/003-release-0-3-1/logs/round3.b.md b/slices/003-release-0-3-1/logs/round3.b.md deleted file mode 100644 index 3100fb56..00000000 --- a/slices/003-release-0-3-1/logs/round3.b.md +++ /dev/null @@ -1,46 +0,0 @@ -# Round 3, lane b — the record against the tree it describes - -Tree read: `c504d36db97a22bc745c157c7d2e68e3d98479a4` (commit `11e0b7a`). Pin: `round3.b.tree`. -Scope: every count written into a code comment, a test comment, a commit message or a slice log, -checked against the tree that ships rather than the tree it was written on. - -**Verdict: changes required (one), and it is made.** - -## Blocking - -**C2. Two comments carried counts from the tree they were written on, not the tree that ships.** - -This is slice 002 round 7's blocker exactly — a mutation result labelled for a tree it was not -scored on — and it had reappeared in two places written by this slice: - -- `lib/beam_mcp/transport/http.ex`, `tool_annotations/2`: "the mutant that leaves it outside - SURVIVES the suite (… 156 tests, 0 failures)". True when written. The shipping tree is 158. -- `test/beam_mcp/transport/http_test.exs`, the deleted-stand-in block: `ALWAYS re-raises -> - KILLED, 147 tests, 1 failure` and `NEVER re-raises -> SURVIVES, 147 tests, 0 failures`. Both - true when written, at 147. The shipping tree is 158. - -Nothing about the *verdicts* was wrong: all three still hold. That is what makes this the -dangerous version of the defect rather than the obvious one — the number is the only thing that -is false, and a reader who re-runs the mutant and gets a different total has to work out whether -the verdict moved with it. - -**Fixed**: both now cite `slices/003-release-0-3-1/logs/mutation-round3.txt`, the table produced -on the final tree and run twice, and quote 158. - -## Read and accepted - -- **`round1.a.md`'s table still shows 147 and 156, and is left alone.** A round verdict is a - record of what that round measured against the tree it pinned; rewriting it to match a later - tree would be the corrections-are-appended rule broken in the file that exists to hold the - correction. `FINDINGS.md` carries the re-score and says which table is which. -- **The (c) and (d) commit messages likewise keep their original counts.** Same reason. The - round-3 re-score is recorded, not backfilled. -- **`CHANGELOG.md` and `README.md` quote no mutation counts**, so nothing shipped to a consumer - needed re-pointing. -- **`HANDOFF.md`'s `158 tests, 0 failures` and `25 commentable files` match the final gate**, - `logs/gate-round3.txt`. -- **The version measurement quoted in `CHANGELOG.md` is the whole row**, corrected in round 2, - and still matches `logs/measure-version-requirement.txt` byte for byte on that row. -- **`logs/probe-d-large-body-reset.txt` is captured whole.** Its first capture was piped through - `grep -v` to hide a repeated log line, which is not a verbatim archive; it was re-run and - written whole before this verdict was signed. diff --git a/slices/003-release-0-3-1/logs/round3.b.tree b/slices/003-release-0-3-1/logs/round3.b.tree deleted file mode 100644 index 920aa037..00000000 --- a/slices/003-release-0-3-1/logs/round3.b.tree +++ /dev/null @@ -1,5 +0,0 @@ -c504d36db97a22bc745c157c7d2e68e3d98479a4 -# tree of commit 11e0b7a, written by: git rev-parse '11e0b7a^{tree}' -# THIS IS THE TREE ROUND 3 LANE b READ. Round 3's own fixes -- the Bandit harness -# timeout and the two re-pointed mutation counts -- were applied after the read. -# HEAD at read time: 11e0b7a9a680729ea402fd463fea57e055b1a2bb diff --git a/slices/004-gate-honesty/FINDINGS.md b/slices/004-gate-honesty/FINDINGS.md deleted file mode 100644 index 916e6547..00000000 --- a/slices/004-gate-honesty/FINDINGS.md +++ /dev/null @@ -1,313 +0,0 @@ - - -# Slice 004 — findings - -The subject of the slice, from `PLAN.md`: **a check that reports on a population it did not -derive is not a weaker check, it is a false one** — it prints `pass` over the thing it never -looked at. Everything below is an instance. - ---- - -## The review closing rule, stated before round 1 opens - -Written here first, and deliberately, because a closing rule invented after the rounds is a -rule chosen to fit the result. - -- **Three rounds maximum.** Two independent lanes per round. -- **Every round writes both artefacts for every lane, at the round's close, not at the end of - the run:** `logs/round..md` (the verdict) and `logs/round..tree` (the tree - pin the lane read). `CONVENTIONS.md`: *"A report owed only at the end is a report a crash - deletes."* A round of this slice without a tree pin would also be self-refuting, since - `tools/signoff.sh` is the slice's own answer to unpinned verdicts. -- **The slice closes when a round returns two `approve` verdicts against the same tree hash, - or when round 3 closes — whichever comes first.** -- **If round 3 closes with anything outstanding, the outstanding item is written into - "Open, recorded rather than fixed" below and the PR is opened saying so.** It is not carried - into a fourth round and it is not quietly dropped. -- **No commit is made on a `changes-required` verdict.** A finding is fixed, or it is recorded - as open with the argument for why it is being left. - ---- - -## Task 1 — the REUSE population and the `licence files` verdict (SCR-262) - -### The red, measured before anything was changed - - $ ./tools/gate.sh # logs/gate-red-before-coverage.txt - reuse FAIL (123 tracked; 42 in scope, 35 headered + 0 sidecar; excluded 79 archive + 2 licence text) - no SPDX-License-Identifier in the file or in a .license sidecar: - .gitignore - FINDINGS.md - HANDOFF.md - NOTICE - PLAN.md - mix.lock - slices/002-streamable-http/FINDINGS.md - licence files pass - GATE_EXIT=1 - -On `main` the same step reads `reuse pass (24 commentable files)` and the gate exits 0 -(`logs/gate-baseline.txt`). **122 tracked files, 24 looked at, `pass` printed over the other 98.** - -### The green, at the tree that ships - - $ ./tools/gate.sh # logs/gate-after-coverage.txt - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (125 tracked; 44 in scope, 42 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files pass - Gate OK. - GATE_EXIT=0 - -The counts reconcile: `125 − 79 archive − 2 licence text = 44 in scope`, and -`42 headered + 2 sidecar = 44`. The 42 is the previous 35 plus the five new headers plus the -two sidecar files, which are themselves tracked and carry the identifier in their own heads. - -### Seven files, not the nine `PLAN.md` §2a predicted - -`PLAN.md` §2a names nine and prescribes four `.license` sidecars, including `LICENSE` and -`LICENSES/Apache-2.0.txt`. The shipped `gate.sh` recognises a licence text by **content hash** -against `LICENSES/*`, so both are covered without a sidecar and without either path appearing -in the script as a name. The step says so on every run: `excluded 2 licence text`. Recorded -here rather than by editing §2a. - -### Three defects fixed in `tools/gate.sh`, and only two were in the plan - -| # | defect | anchor | mutation that kills the anchor | -|---|---|---|---| -| 1 | population was `git ls-files -- '*.ex' '*.exs' '*.sh' '*.yml'` under a comment reading *"never from a hand list"* | P1, P2, P3 | **M1** — revert the population to the glob; all three return to `pass` | -| 2 | sidecar looked up with `[ -f "$f.license" ]`, a **filesystem** test beside a `git ls-files` population | P8 | **M3** — revert to `[ -f ]`; P8 returns to `pass` | -| 3 | `licence files` verdict guarded by the **shared** `$fail` accumulator | P7 | **M2** — revert to `[ "$fail" -eq 0 ]`; P7's line count goes to 0 | - -**Defect 2 was found during this slice, not planned.** It is `CONVENTIONS.md` instance #1 -— *"an unadded file is invisible to `git ls-files`"* — reappearing on the **coverage** side of -the same check the convention was written about. Measured red (`logs/red-sidecar-untracked.txt`): -a tracked `probe-sidecar.yaml` with an **untracked** `probe-sidecar.yaml.license` gave - - reuse pass (126 tracked; 45 in scope, 42 headered + 3 sidecar; ...) - GATE_EXIT=0 - -counting a sidecar that does not exist in a fresh clone or in CI. After the fix the same plant -reads `FAIL`, and `git add`ing the sidecar — nothing else changed — returns it to `pass`. The -anchor moves in both directions. - -### `PLAN.md` §2a's P5 row is falsified by measurement - -This is the disagreement the run found, and it is recorded rather than reconciled. - -§2a predicts that before the fix, P5 (missing `NOTICE` **plus** an earlier step red) shows the -`licence files` line **absent**. It does not. `logs/probe-gate-honesty-before.txt`, captured -against the unfixed script: - - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - reuse line : reuse FAIL -- no SPDX-License-Identifier: - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - -Reading the old code says why — only the **pass** branch was ever guarded: - - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; fail=1; } # unguarded - done - [ "$fail" -eq 0 ] && note "licence files" "pass" # guarded - -P5 renames `NOTICE` away and thereby forces the one branch that always printed. It measures -**identical before and after** and anchors nothing. The input that vanishes the line is the -opposite of P5's: an earlier step red with **every licence file present**. - -That is P7, added against the plan rather than from it, and mutant M2 confirms it discriminates: - - M2 (shared accumulator restored), logs/mutation-m2.txt - P5 licence files line count: 1 <- unchanged, as the false prediction's own probe - P7 licence files line count: 0 <- the line vanishes - P1 licence files line count: 0 - P2 licence files line count: 0 - P3 licence files line count: 0 - P8 licence files line count: 0 - -M2 also shows the defect's real reach: **any** red reuse step deleted the line, not only the -one P5 constructs. P5 is kept in the harness, with the refutation appended beside it, as the -record of a prediction the run overturned. - -### Probe results — every row measured, none typed fresh - -`tools/probe_gate_honesty.sh`, one committed re-runnable harness. It refuses on a dirty tracked -tree, plants through `git add` (an unadded plant is invisible to the population and would be -scored as a `pass` the check was right to give), runs the **real** `./tools/gate.sh`, reads the -**step line** rather than the exit code, and asserts `git status --porcelain` clean afterwards. - -before = `logs/probe-gate-honesty-before.txt` (unfixed script); -after = `logs/probe-gate-honesty-after.txt` (tree `34c27e0`). - -| probe | plants | before | after | expected? | -|---|---|---|---|---| -| P0 | unheadered `.yaml`, **not** `git add`ed | `reuse pass` | `reuse pass` | yes — the control. The probe is at fault, not the check | -| P1 | unheadered `.yaml`, added | `reuse pass` | `reuse FAIL`, names it | yes | -| P2 | unheadered extensionless `PROBEGATEHONESTY`, added | `reuse pass` | `reuse FAIL`, names it | yes | -| P3 | unheadered `.md`, added | `reuse pass` | `reuse FAIL`, names it | yes | -| P4 | unheadered `.yaml` + **tracked** sidecar | `reuse pass` | `reuse pass` | yes — the sidecar covers, and it is the covering mechanism rather than an exception to the population | -| P5 | unheadered `.sh` + `NOTICE` renamed away | `licence files` **count 1**, `FAIL` | count 1, `FAIL` | **NO — §2a predicted count 0. See above.** | -| P6 | `LICENSE` renamed away, nothing else | `licence files FAIL` | `licence files FAIL` | yes — unchanged, and recorded as not-new-coverage | -| P7 | unheadered `.sh`, all licence files present | count **0** (M2) | count 1, `pass` | yes — 2b's only real anchor | -| P8 | unheadered `.yaml` + **untracked** sidecar | `reuse pass` (M3) | `reuse FAIL`, names it | yes | - -P7's and P8's "before" columns are read from mutants M2 and M3 rather than from the unfixed -script, and that is the stronger comparison, not a weaker one: each mutant changes **one line**, -so the probe's swing is attributable to that line. Both mutant diffs are printed at the head of -their own transcript. - -### Mutations — all three, and each is one line - -`PLAN.md` §2a prescribes M1. M2 and M3 were added because defects 2 and 3 would otherwise have -no mutation at all. - -| mutant | the one line changed | prediction | measured | -|---|---|---|---| -| M1 | `done < <(git ls-files)` -> the four-extension glob | P1, P2, P3 return to `pass` | **P1, P2, P3, P8 all `pass`, GATE_EXIT=0.** P5 and P7 stay `FAIL` — their plant is a `.sh`, in both populations by design | -| M2 | `[ "$lic_fail" -eq 0 ]` -> `[ "$fail" -eq 0 ]` | P7 line count -> 0 | **P7, P1, P2, P3, P8 -> 0. P5 -> 1** | -| M3 | `[ -n "${tracked[$f.license]-}" ]` -> `[ -f "$f.license" ]` | P8 returns to `pass` | **P8 `pass`, GATE_EXIT=0; every other probe unchanged** | - -Transcripts: `logs/mutation-m1.txt`, `logs/mutation-m2.txt`, `logs/mutation-m3.txt`. Each was -produced on a throwaway branch with the mutant committed, because the harness refuses to run on -a dirty tracked tree — so the mutation is a real tree the probe read, not an edit made -underneath it. - -One detail worth reading in M1: the counts collapse to `26 tracked; 26 in scope, 0 archive + -0 licence text`. Under the glob there is nothing to exclude, because there was nothing in scope -to exclude *from*. The exclusion counts the fixed step prints are only meaningful because the -population is the whole tree. - ---- - -## Task 2 — `tools/signoff.sh` (SCR-265) - -Motivated by two record gaps measured in this repository's own shipped slices, not by a -requirement document: - - $ git ls-files -- 'slices/001b-ping-guard/logs/round*' | grep -vc '\.tree$' -> 16 - $ git ls-files -- 'slices/001b-ping-guard/logs/*.tree' | wc -l -> 0 - - $ git ls-files -- 'slices/002-streamable-http/logs/round4.*' - slices/002-streamable-http/logs/round4.r1.tree <- a tree nobody gave a verdict on - slices/002-streamable-http/logs/round4.r2.tree <- a tree nobody gave a verdict on - slices/002-streamable-http/logs/round4.s1.md - slices/002-streamable-http/logs/round4.s1.tree - -Sixteen verdicts bound to no tree; three pins of which two certify nothing. Same defect from -opposite ends, so **a record is one file carrying both facts** — a verdict without a tree does -not parse, a tree without a verdict is not a record, and there is no pairing step to get wrong. -Neither archive is repaired: they are the evidence. - -Nine probes (S1–S9), all as expected, and two mutations, neither surviving. Transcript: -`logs/probe-signoff.txt`. - -Not wired into `gate.sh` or CI, with the reason stated in the script's own header rather than -left to be inferred. - ---- - -## The rounds - -Three rounds, two lanes each, closing rule as stated at the top of this file. - -| round | lane | verdict | finding | tree bound | -|---|---|---|---|---| -| 1 | r1 | changes-required | **R1-A** `gate.sh` reports `pass` over 10 of 145 files on bash 3.2. **R1-B** a symlink walks through `signoff/`'s whitelist | `9a7998d1…` | -| 1 | r2 | changes-required | **R1-C** `verify` can never pass on a slice that runs rounds | `9a7998d1…` | -| 2 | r1 | changes-required | **R2-A** the signoff exclusion depended on which `grep` is first on `PATH` | `7ae4f833…` | -| 2 | r2 | changes-required | **R2-B** the harness scored a mutation that had never been applied | `7ae4f833…` | -| 3 | r1 | approve | nothing blocking; `gate.sh` and both harnesses re-run clean | shipped tree | -| 3 | r2 | approve | nothing blocking; every FINDINGS claim re-derived from its transcript | shipped tree | - -Every finding above was found by **using** a tool, not by reading it. That is the one pattern -across the rounds worth keeping: three of the five are the slice's own subject — a mechanism -reporting on something it had not looked at — reappearing inside the fixes for it. - -- **R1-A** is the subject exactly: the population fix reintroduced `pass` over an unlooked-at - population, on every stock macOS, with two stderr lines as the only sign. -- **R2-B** is the subject one level up: the *harness* reported on a mutant it had never applied, - and reported it as a **survivor** — the direction that costs the most, because a survivor - reads as a real finding and gets acted on. -- **R1-C** and **R2-A** are the same shape pointing the other way: a check that can only refuse. - `CONVENTIONS.md` says a check that cannot fail "reads as coverage and is not". A check that - cannot pass reads as rigour and is not, and its one stable outcome is to be switched off. - -The gate at the shipped tree, every step line read rather than the exit code -(`logs/gate-round3.txt`): - - == beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (160 tracked; 53 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files pass - Gate OK. - GATE_EXIT=0 - ---- - -## Open, recorded rather than fixed - -- **Both lanes of every round were run by the same agent.** Subagent spawning was withheld for - this run, so "two independent lanes" here means two passes with different remits and different - evidence, not two parties. A lane cannot be independent of itself. This is the weakest thing - about the record and it is stated first for that reason. - -- **A tree pin cannot live inside the tree it pins, and `logs/round..tree` therefore - cannot be made self-consistent.** Committing round 3's `.tree` file changes the tree that file - names. So `logs/round3.*.tree` holds `38e1d07c…`, the review tree the round-3 lanes read at - commit `12345d6`, while `signoff/round3.*.signoff` binds the shipped tree — and the two differ - by exactly the commit that adds the round-3 record. This is not a defect to fix; it is the - structural reason `signoff/` is excluded from the reviewed tree and the manual `logs/*.tree` - practice slice 002 invented is not the mechanism. It was found by using the tool on the slice - that builds it, which is what `PLAN.md` §4 said that use was for. - -- **The ordering of "review, record, fix" had to be recovered rather than followed, in both - rounds 1 and 2.** `record` binds the tree in front of it, so a record written after its own - round's fixes have landed names a tree no lane read. Round 1 was recovered with `git stash`, - round 2 from a detached checkout of the reviewed commit. Both records are correct; the - process that produced them was not, twice, and the tool caught neither because both recoveries - were done by hand. The mechanism this suggests — `record` taking the commit it binds — was not - built, because designing it after two hand recoveries is a change nobody has reviewed. - -- **`slices/*/logs/` is outside the REUSE step.** Source placed there escapes it. The exclusion - is counted and printed on every run so it cannot grow quietly, but the limit is real and is - stated in `gate.sh` itself. - -- **`archive_sweep.sh` exits non-zero on `main`** after the SCR-263 fix at `3eddb8a`, because - three of slice 001b's archives have drifted from a tree that has since moved. That is drift, - named rather than silenced. Re-capturing those archives is slice 001b's record to change, and - the script is therefore **not** wired into `gate.sh` or CI. - -- **`HANDOFF.md` was touched for its SPDX header only** — five inserted lines, zero deleted, - verified with `git diff --cached --stat`. Its *content* belongs to the concurrent - `slice/003-release-0-3-1`. The merge-time overlap is that branch owner's to resolve. - -- **`PLAN.md` §4's `verify` table is departed from**, per R1-C: the highest round decides and - earlier rounds are history. The plan text is left as written. What is not relaxed: every - record must still parse, in every round. - -- **`PLAN.md` §5 prescribes six commits; this slice made more, and grouped differently.** The - reason §5 gives — *"so no commit leaves the gate red"* — holds: the coverage commit lands - first and the gate is green at every commit on the branch. - -- **`PLAN.md` §3 (SCR-249, the four `mix docs` honesty questions) was not investigated.** It is - marked time-boxed and optional in the plan, and the three rounds went to the findings above - instead. Nothing was changed in that step, and no claim is made about it. - -- **`probe_signoff.sh` uses `${id,,}`, a bash 4 construct.** R1-A's fix covers `gate.sh`, which - is the gate step; the probe is a developer tool and was left. Recorded so the inconsistency is - not read as an oversight. - -- **`signoff.sh` cannot know whether a reviewer read anything.** It records which tree a verdict - is about. The hash is written by the party it certifies. diff --git a/slices/004-gate-honesty/PLAN.md b/slices/004-gate-honesty/PLAN.md deleted file mode 100644 index 9f22b1b1..00000000 --- a/slices/004-gate-honesty/PLAN.md +++ /dev/null @@ -1,347 +0,0 @@ - - -# Slice 004 — gate honesty - -**Base:** `origin/main` = `31bcbff` ("Date the 0.3.0 changelog heading for release"). -**Branch:** `slice/004-gate-honesty`. **Worktree:** `beam_mcp-wt/004-gate-honesty`. -**Ships no release.** No version bump, no CHANGELOG entry, no tag, no `mix hex.publish`. - -**Files this slice may touch:** `tools/`, `.githooks/`, `.github/`, `slices/004-gate-honesty/`, -plus the nine tracked files named in §2 that the REUSE step cannot presently see. -`mix.exs`, `README.md`, `CHANGELOG.md`, `lib/` and `test/` belong to the concurrent "release" -slice and are **not touched**; if this slice concludes it needs one, that is a report. - -The subject of the slice is stated once, because every item below is an instance of it: -**a check that reports on a population it did not derive is not a weaker check, it is a false -one** — it prints `pass` over the thing it never looked at. - ---- - -## 0. Baseline, measured before anything was changed - - $ ./tools/gate.sh # slices/004-gate-honesty/logs/gate-baseline.txt - == beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass - Gate OK. - GATE_EXIT=0 - - $ git ls-files | wc -l - 122 - $ git ls-files -- '*.ex' '*.exs' '*.sh' '*.yml' | wc -l - 24 - -**122 tracked files. The REUSE step looks at 24 of them and says `pass`.** That is the whole of -item 7's first half in two counts. - ---- - -## 1. Item 6 — SCR-263, `tools/archive_sweep.sh` - -### What is actually true now, verified rather than taken from the issue - -The issue predates the script's closing tally, so both halves were re-measured on `31bcbff`. - -**(a) A `DIFFERS` does not affect the exit status — confirmed, and it is not hypothetical:** - - $ ./tools/archive_sweep.sh > slices/004-gate-honesty/logs/sweep-baseline.txt 2>&1 - SWEEP_EXIT=0 - => full-suite.txt DIFFERS (the diff above is the difference) - => gate.txt DIFFERS (the diff above is the difference) - => probe-after.txt DIFFERS (the diff above is the difference) - -Three of thirteen verdicts are `DIFFERS` **today, on `main`**, and the script exits `0`. A -caller that reads the exit code — which is what wiring it into `gate.sh` or CI would do — reads -a clean sweep. `verdict()` prints and returns nothing; only the tally can exit non-zero. - -This is also why the issue's trigger condition ("fix before wiring into `gate.sh` or CI") is -the right way round: wiring it first would have wired in a green light. - -**(b) The tally compares integers where it claims to compare names — confirmed by reading -lines 203–213.** `ENUM` is `git ls-files -- "$L/*" | wc -l`; `CLASSIFIED` is a counter -incremented once per `verdict` call; `AUTH` is a second `wc -l`. Nothing compares the *set* of -classified names against the *set* of enumerated names, so a file can drop out of the -population and a different one can be classified in its place and the tally still balances — -which is precisely the "quiet" failure the tally was added to prevent. - -### The fix - -1. `verdict()` sets a `SWEEP_FAIL` flag on any non-`RAW` outcome, and `fetch_check`'s - `UNCHECKED` branch sets it too — a check that could not run is not a pass, which is the - rule `gate.sh`'s own header states. The script exits non-zero if the flag is set. -2. `verdict()` records the **path** it classified into a list. The closing tally replaces the - integer comparison with a `comm` over sorted name sets, printed in **both directions**: - *enumerated but not classified* and *classified but not enumerated*. The second direction - is the one the counter could never see. -3. The counts stay, beside the names, because a count is easier to read; the names are what - decides. - -### Consequence, declared now rather than discovered at review - -With (1) applied, **the sweep exits non-zero on today's `main`**, because the three `DIFFERS` -are real: `full-suite.txt`, `gate.txt` and `probe-after.txt` were captured at slice 001b's tree -and the tree has since moved (the gate gained a `docs` step; the suite gained tests). That is -drift, not fabrication, and the fixed script says so in its own words rather than being -silenced. **The sweep is therefore not wired into `gate.sh` in this slice** — the gate must -have every step reading `pass`, and re-capturing another slice's archives is that slice's -record to change, not mine. Recorded in FINDINGS and reported. - -### Probe (population derived the way the tally derives it) - -The tally's population is `git ls-files -- "$L/*"`. The probe therefore plants its violation -with `git mv` — a *tracked* rename — so the file is in that population, which is exactly the -lesson of `CONVENTIONS.md`'s first derivation instance: - - git mv slices/001b-ping-guard/logs/mutation-a.txt \ - slices/001b-ping-guard/logs/mutation-c.txt - -`ENUM` is unchanged (29). The `for m in a b` loop still calls `verdict` for the now-absent -`mutation-a.txt`, so `CLASSIFIED` is unchanged (13). `mutation-c.txt` is enumerated and -classified nowhere. - -- **Before the fix:** expected `=> TALLY BALANCES` and exit 0. A file left the population - unnoticed and the instrument reported a complete sweep. -- **After the fix:** expected `TALLY FAILS`, naming `mutation-c.txt` as enumerated-not-classified - **and** `mutation-a.txt` as classified-not-enumerated, exit non-zero. - -Both transcripts archived by redirection. The rename is reverted and `git status` asserted -clean in the same recorded run. - ---- - -## 2. Item 7 — SCR-262, two gate honesty defects - -### 2a. The REUSE population is a hand list wearing a derivation's comment - -`tools/gate.sh:50-51` says *"every tracked file that can carry a comment carries an SPDX -identifier. Derived from the tracked set, never from a hand list"*, and line 52 then writes the -hand list: `git ls-files -- '*.ex' '*.exs' '*.sh' '*.yml'`. Measured: **24 of 122 tracked -files.** A `.md`, a `.yaml`, a `.toml` or an extensionless file is invisible, and invisible -files report `pass`. - -**The fix: the population becomes `git ls-files`, with no glob.** One exclusion survives, and -it is structural rather than convenient: - - slices/*/logs/* - -Those are the verbatim archives. `CONVENTIONS.md` — *"A verbatim archive is written by a -command that fetches it, or it does not exist"* — makes editing their bytes the thing that -destroys them, so they cannot carry a header, and three of them are upstream specification -pages whose licence is not this project's to declare. The exclusion is therefore **printed with -its count on every run**, so it can never grow quietly, and its limit is stated rather than -hidden: source code placed under `slices/*/logs/` would escape this step. - -Measured, so the size of the change is known before it is made: - - $ git ls-files -- 'slices/*/logs/*' | wc -l - 79 - $ comm -23 <(git ls-files|sort) <(git ls-files -- 'slices/*/logs/*'|sort) | wc -l - 43 - -and of those 43, the nine the current step cannot see: - - FINDINGS.md .gitignore - HANDOFF.md mix.lock - PLAN.md LICENSE - slices/002-streamable-http/FINDINGS.md NOTICE - LICENSES/Apache-2.0.txt - -**Coverage for the nine, by the mechanism each file admits:** - -- The four `.md` files and `.gitignore` get an SPDX header in the comment syntax they already - support — the same HTML-comment block every other `.md` in this tree carries. -- `LICENSE`, `NOTICE`, `LICENSES/Apache-2.0.txt` and `mix.lock` get a **`.license` sidecar**, - which is REUSE's own answer for a file whose bytes must not change (`mix.lock` is rewritten - by `mix`; the other three are licence text). The step reads `.license` as satisfying - ``. No new hand list: the sidecar rule is one derived rule applied to any path. - -None of the nine is in the "release" slice's file set. - -### 2b. The `licence files` verdict vanishes when an earlier step fails - -`tools/gate.sh:65` — `[ "$fail" -eq 0 ] && note "licence files" "pass"`. `$fail` is the -**shared** accumulator, so a red `format`, `test`, `credo`, `docs` or `reuse` deletes this -step's line entirely. The header two lines from the top of the same file promises *"Every step -reports its own verdict and its own exit code"*. This step is the one that does not, and the -mode it fails in is the worst one available: the line is not wrong, it is **absent**, and a -reader scanning for `FAIL` finds nothing. - -**Fix:** a step-local accumulator, so the step's verdict depends only on the step's own -measurement, and the line is printed unconditionally. - -### Probes — `tools/probe_gate_honesty.sh` - -One committed, re-runnable harness. It refuses to run on a dirty tree, plants each violation, -runs the **real** `./tools/gate.sh`, reads the **step line** rather than the exit code -(`CONVENTIONS.md`: *"read the step's line, not just the exit code"*), then reverts and asserts -`git status --porcelain` empty. - -Every planted file is `git add`ed, because the check derives its population from `git ls-files` -and an unadded file is invisible — instance #1 in `CONVENTIONS.md`, reproduced deliberately as -probe P0 so the harness demonstrates on itself that it is planting inside the population. - -| probe | plants | before the fix | after the fix | -|---|---|---|---| -| P0 | unheadered `probe.yaml`, **not** `git add`ed | `reuse pass` | `reuse pass` — recorded as the control: the probe, not the check, is at fault | -| P1 | unheadered `probe.yaml`, `git add`ed | `reuse pass` | `reuse FAIL`, naming the file | -| P2 | unheadered `PROBE` (no extension), `git add`ed | `reuse pass` | `reuse FAIL`, naming the file | -| P3 | unheadered `probe.md`, `git add`ed | `reuse pass` | `reuse FAIL`, naming the file | -| P4 | headered `probe.yaml` + delete its content's header only | `reuse pass` | `reuse FAIL` | -| P5 | unheadered `.yaml` **and** `git mv NOTICE NOTICE.x` | `licence files` line **absent** | both lines `FAIL`, both present | -| P6 | `git mv LICENSE LICENSE.x` alone | `licence files FAIL` | `licence files FAIL` (unchanged; the guard is only visible behind an earlier failure) | - -P5 is the one that matters for 2b and it is the pair, not the single: a missing licence file -**with an earlier step already red** is the only input that distinguishes the two versions. -P6 exists so the table shows the case that already worked and is not claimed as new coverage. - -Additionally, a **mutation** on the fixed script: revert the population to the four-extension -glob and re-run P1–P3; all three must return to `pass`. A probe that cannot go green under the -old code is not testing the change. - ---- - -## 3. Item 8 — SCR-249, `mix docs` as a gate step - -**The coordinator has confirmed this shipped and it is not this slice's work.** Verified -independently: `tools/gate.sh:41-48` reads `mix docs`'s *output* because the command exits 0 on -a warning, and the baseline above shows the step present and `pass`. Nothing to build. - -What remains is the *honesty* question, and it is **time-boxed and optional**. Four routes will -be checked and each answered yes or no with a measurement; **if none is real, that is the -report and no change is made.** - -1. Can `warning:` reach the count from **dependency compilation** rather than from docs? -2. Can a **tracked file's own content** put the literal `warning:` into `mix docs` output? -3. Does the step **leave `doc/` behind**, and does that change any later step's result? -4. Can the step **fail for a reason unrelated to docs** and report it as a docs failure? - -Investigated in a throwaway `git clone` under the scratchpad, never in the shared worktree, -because probing (2) means editing `lib/` and `lib/` belongs to the "release" slice. - ---- - -## 4. Item 9 — SCR-265, `tools/signoff.sh` - -`tools/` contains `archive_sweep.sh`, `gate.sh`, `measure_body.exs`, `probe_optional_deps.sh`, -`probe_ping.exs`. Verified: **no signoff script.** No reference implementation is available to -this slice, so the design is derived from the requirement. - -**The requirement, from the failure it comes from.** Slice 001b ran an extra review round -because a version bump moved the tree after both lanes had approved it. The two facts a -signoff must carry are therefore *what was read* and *whether it is still what is there* — and -the second must **refuse**, not assume. Slice 002 already reached for this by hand: its logs -carry `round3.r1.tree`, `round4.s1.tree` and four more, bare 40-hex files with nothing that -reads them. Mechanising an existing manual practice, not inventing one. - -### Design - - tools/signoff.sh record [note] - tools/signoff.sh verify - -**The hash a signoff binds is the tree with the signoff records removed.** Without that the -mechanism eats itself: recording lane r1's verdict changes the tree and so invalidates it -before lane r2 records. Computed with git's own plumbing, in a scratch index, so the value is -reproducible by anyone from the same commit: - - GIT_INDEX_FILE=$tmp git read-tree HEAD - GIT_INDEX_FILE=$tmp git rm -r --cached -q slices/*/signoff - GIT_INDEX_FILE=$tmp git write-tree - -`slices//signoff/` is the one directory the tool owns and the one it excludes. `verify` -enforces that nothing else hides there: every file under it must be a `*.signoff` record or the -tool's own `verify.txt`, or `verify` refuses. Otherwise "excluded from the reviewed tree" -would be a place to put code. - -**Both commands refuse rather than assume, and each refusal is a named exit:** - -| condition | result | -|---|---| -| working tree has modified/deleted tracked files, or untracked files outside `slices/*/signoff/` | refuse — the hash would not describe what the reviewer read | -| `verify` over a slice with **zero** records | **refuse** — no signoff must never read as signed off. This is the whole class of defect this slice is about, so the tool must not contain it | -| a record's tree hash ≠ the current review tree | `STALE`, refuse — this is 001b's failure, mechanised | -| any record's verdict is `changes-required` | refuse | -| a record is unparseable or missing a field | refuse — not skipped | - -### Probe — `tools/probe_signoff.sh` - -Runs entirely inside a `mktemp -d` git repository it builds itself, so it touches nothing. -Its population is derived the way `verify` derives it: records are created **by calling -`signoff.sh record`**, and the tree is moved **by a real commit**, not by editing a hash. - -| probe | plants | expected | -|---|---|---| -| S1 | two `approve` records at tree T, nothing else | `verify` exits 0 | -| S2 | S1, then a commit changing a tracked file | `verify` exits non-zero, both records `STALE` | -| S3 | S1, then a commit that changes **only** `slices/*/signoff/` | `verify` exits 0 — the exclusion is load-bearing and this proves it, rather than asserting it | -| S4 | no records at all | `verify` exits non-zero. If this passes, the tool is the defect it was written against | -| S5 | one `approve`, one `changes-required` | `verify` exits non-zero | -| S6 | a stray `notes.txt` under `slices/*/signoff/` | `verify` refuses | -| S7 | a record with its `tree:` line deleted | `verify` refuses, does not skip | - -**Mutation on the fixed tool** — remove the `git rm -r --cached slices/*/signoff` line and -re-run: S1 and S3 must break. An exclusion whose removal changes nothing was never load-bearing. - -### Not wired into `gate.sh` or CI, and the reason is stated - -Wiring `verify` into the gate would demand signoff records on every push, including the push -that introduces the tool and including the concurrent "release" slice's branch. That is a -policy decision for the owner, not a side effect of adding a script. **Reported, not taken.** - -Instead this slice **uses** it: each review lane records its verdict with -`tools/signoff.sh record`, and `verify` is run and quoted before the PR is opened. A tool whose -first use is its own slice is the cheapest available demonstration that it works on a real tree. - ---- - -## 5. Commits - -Each is one thing, each carries its own evidence, each is `git commit -s`, and none carries a -tool-attribution trailer. - -1. **cover the nine tracked files the REUSE glob cannot see** — five headers, four `.license` - sidecars. Message quotes the derivation command and its nine-line output. -2. **derive the REUSE population from the tracked set** — `gate.sh` + `tools/probe_gate_honesty.sh`. - Message carries the red: the new step run against the pre-commit-1 tree, naming nine files. -3. **the `licence files` verdict does not depend on earlier steps** — `gate.sh` + P5 in the - probe harness. Message carries the red: the P5 transcript in which the line is absent. -4. **`archive_sweep.sh`: a `DIFFERS` fails the run and the tally compares names** — message - carries `SWEEP_EXIT=0` beside three `DIFFERS`, and the `TALLY BALANCES` under the planted - rename. -5. **`tools/signoff.sh` + `tools/probe_signoff.sh`** — message carries S2 and S4. -6. **slice record** — this PLAN, `FINDINGS.md`, and the logs. - -Order matters: 1 before 2 so no commit leaves the gate red, and the red for 2 is captured by -applying 2's `gate.sh` alone against the tree before 1. - -## 6. Acceptance - -- `./tools/gate.sh` exits 0 with **every step line reading `pass`** — no ratchet, no baseline. - Archived verbatim by redirection at the final tree. -- Every probe table above has both a before and an after transcript, each written by the - command that produced it. -- Every fix has at least one planted violation the fixed check catches and the unfixed check - does not, with the plant made through the same command the check derives its population from. -- Up to three review rounds, lanes spawned by this slice, each recording the tree hash it read - via `tools/signoff.sh`. No commit on a changes-required verdict. -- A PR against `main`, not merged, with every check's conclusion read from the **jobs** API. - A check reporting `steps=0` did not run and is not a verdict. - -## 7. Known limits, written before the work rather than after - -- `slices/*/logs/` is outside the REUSE step. Source placed there escapes it. -- The fixed `archive_sweep.sh` exits non-zero on `main` because three archives have drifted - from a moved tree. Naming the drift is the fix; re-capturing those archives is slice 001b's - record, not this slice's. -- `tools/signoff.sh` binds a *tree*, which is what the reviewer read. It cannot know whether - the reviewer read it. -- Nothing here reduces the honesty of a check that is already honest, and no step is added to - `gate.sh` that could pass without measuring something. diff --git a/slices/004-gate-honesty/logs/gate-after-coverage.txt b/slices/004-gate-honesty/logs/gate-after-coverage.txt deleted file mode 100644 index 8a03f28d..00000000 --- a/slices/004-gate-honesty/logs/gate-after-coverage.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (125 tracked; 44 in scope, 42 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/004-gate-honesty/logs/gate-baseline.txt b/slices/004-gate-honesty/logs/gate-baseline.txt deleted file mode 100644 index 45d759c4..00000000 --- a/slices/004-gate-honesty/logs/gate-baseline.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (24 commentable files) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/004-gate-honesty/logs/gate-red-before-coverage.txt b/slices/004-gate-honesty/logs/gate-red-before-coverage.txt deleted file mode 100644 index 640d8ae6..00000000 --- a/slices/004-gate-honesty/logs/gate-red-before-coverage.txt +++ /dev/null @@ -1,19 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse FAIL (123 tracked; 42 in scope, 35 headered + 0 sidecar; excluded 79 archive + 2 licence text) - no SPDX-License-Identifier in the file or in a .license sidecar: - .gitignore - FINDINGS.md - HANDOFF.md - NOTICE - PLAN.md - mix.lock - slices/002-streamable-http/FINDINGS.md - licence files pass -GATE FAILED. -GATE_EXIT=1 diff --git a/slices/004-gate-honesty/logs/gate-round3.txt b/slices/004-gate-honesty/logs/gate-round3.txt deleted file mode 100644 index 7462bbbb..00000000 --- a/slices/004-gate-honesty/logs/gate-round3.txt +++ /dev/null @@ -1,11 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (160 tracked; 53 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/004-gate-honesty/logs/mutation-m1.txt b/slices/004-gate-honesty/logs/mutation-m1.txt deleted file mode 100644 index 3eb04cea..00000000 --- a/slices/004-gate-honesty/logs/mutation-m1.txt +++ /dev/null @@ -1,157 +0,0 @@ -=== MUTANT m1: the ONLY change from the committed tools/gate.sh is === -@@ -110,7 +110,7 @@ while read -r f; do - n_lictext=$((n_lictext + 1)); continue - fi - missing="${missing}${f}"$'\n' --done < <(git ls-files) -+done < <(git ls-files -- '*.ex' '*.exs' '*.sh' '*.yml') - n_scope=$((n_tracked - n_archive - n_lictext)) - if [ -z "$missing" ]; then - note "reuse" "pass ($n_tracked tracked; $n_scope in scope, $n_head headered + $n_sidecar sidecar; excluded $n_archive archive + $n_lictext licence text)" - -=== full ./tools/probe_gate_honesty.sh output under mutant m1 === -=== the population, as the REUSE step derives it === - $ git ls-files | wc -l - 126 - This is the whole of the derivation. Everything below is planted into THIS set or - deliberately outside it. - -=== P0 -- the control, and it is the probe failing rather than the check === - An unheadered probe.yaml that is NOT git added. The step derives its population from - git ls-files, so the file does not exist as far as the check is concerned and the step - is RIGHT to say pass. Recorded so no later probe here can be read as proof by accident. - -- P0: unheadered probe-gate-honesty.yaml, NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (26 tracked; 26 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P1 -- .yaml, git added. The extension the old glob ('*.yml') was one letter from === - -- P1: unheadered probe-gate-honesty.yaml, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (26 tracked; 26 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P2 -- no extension at all. Nothing a glob on extensions can ever reach === - -- P2: unheadered extensionless PROBEGATEHONESTY, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (26 tracked; 26 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P3 -- .md. Every other .md in this tree carries a header; this step never read one === - -- P3: unheadered probe-gate-honesty.md, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (26 tracked; 26 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P4 -- the same .yaml with a .license sidecar. Proves P1's FAIL is about the missing - identifier and not about the extension, and that the sidecar route actually works === - -- P4: unheadered probe-gate-honesty.yaml + a sidecar carrying the identifier - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 2 - reuse line : reuse pass (26 tracked; 26 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P5 -- THE ONE THAT MATTERS FOR THE SECOND DEFECT === - A missing licence file AND an earlier step already red. That pair is the only input - that distinguishes a step-local verdict from one guarded by the shared accumulator: - with `[ "$fail" -eq 0 ] && note "licence files" "pass"`, the line VANISHES. Not a - wrong verdict -- no verdict, in a script whose header promises every step reports one. - Watch 'licence files line count'. Zero is the defect. - - The plant here is an unheadered .sh and NOT the .yaml used above, deliberately: .sh is - in the OLD four-extension population as well as the new one, so this probe turns the - reuse step red under both versions of the script and the only thing that changes - between the before and after runs is the licence-files guard. A probe whose plant is - invisible to the version it is comparing against measures two changes at once. - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (27 tracked; 27 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P6 -- the control for P5: a missing licence file with NOTHING else red === - This case worked before the fix and works after it. It is here so the table shows what - is not new coverage, rather than letting P5's result stand for both. - -- P6: LICENSE renamed away, nothing else planted - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (26 tracked; 26 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files FAIL -- LICENSE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - -=== P7 -- the probe P5 was SUPPOSED to be, added because P5 measured identical before - and after and therefore tested nothing === - CORRECTION, APPENDED RATHER THAN SUBSTITUTED. PLAN.md 2a's table predicts that under - the shared accumulator P5 shows the 'licence files' line ABSENT. It does not, and the - before-transcript says so: 'licence files line count: 1', reading 'FAIL -- NOTICE - missing'. Reading the old code explains why -- only the PASS branch was guarded: - - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; fail=1; } <- unguarded - done - [ "$fail" -eq 0 ] && note "licence files" "pass" <- guarded - - So the input that vanishes the line is the OPPOSITE of P5's: an earlier step red while - every licence file is PRESENT. P5 renames NOTICE away and thereby forces the one branch - that always printed. P7 plants the earlier red and leaves the licence files alone. - Before the fix the line count is 0; after it, 1 reading pass. That is the anchor 2b had - none of, and it is the shape this whole slice is about: not a wrong verdict, no verdict. - -- P7: unheadered probe-gate-honesty.sh, ALL licence files present - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (27 tracked; 27 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P8 -- the sidecar looked up on disk instead of in the tracked set === - P4 proves a sidecar covers its file. It does not ask WHERE the step looked for the - sidecar. The step's population is git ls-files; its sidecar test was `[ -f ]`, a - filesystem test -- so an UNTRACKED sidecar covered a TRACKED file on the author's disk - and did not exist in a fresh clone or in CI. CONVENTIONS.md instance #1, on the - coverage side of the same check. Measured red: logs/red-sidecar-untracked.txt. - -- P8: unheadered probe-gate-honesty.yaml + a sidecar that is NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (26 tracked; 26 in scope, 26 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== what to read === - P1, P2, P3 reuse must FAIL and NAME the file. Under the four-extension glob all - three read pass, because the file was never in the population. - P4 reuse must pass -- the sidecar is the covering mechanism, not an - exception to the population. - P5 'licence files line count' must be 1 and the line must read FAIL. - Under the shared accumulator it is 0. - MEASURED FALSE -- it is 1 under both, see P7. P5 is retained as the - record of a prediction the run refuted, not as coverage. - P7 'licence files line count' must be 1 and the line must read PASS. - Under the shared accumulator it is 0. This is 2b's only real anchor. - P8 reuse must FAIL and name probe-gate-honesty.yaml. With the sidecar - tested by [ -f ] it reads pass and counts the sidecar. - P0, P6 unchanged by either fix, and recorded as such. - -=== cleanup === - git status --porcelain (tracked): empty. Every plant is reverted. -PROBE_EXIT=0 diff --git a/slices/004-gate-honesty/logs/mutation-m2.txt b/slices/004-gate-honesty/logs/mutation-m2.txt deleted file mode 100644 index 200c9157..00000000 --- a/slices/004-gate-honesty/logs/mutation-m2.txt +++ /dev/null @@ -1,161 +0,0 @@ -=== MUTANT m2: the ONLY change from the committed tools/gate.sh is === -@@ -133,7 +133,7 @@ lic_fail=0 - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; lic_fail=1; fail=1; } - done --[ "$lic_fail" -eq 0 ] && note "licence files" "pass" -+[ "$fail" -eq 0 ] && note "licence files" "pass" - - if [ "$fail" -eq 0 ]; then echo "Gate OK."; else echo "GATE FAILED."; fi - exit "$fail" - -=== full ./tools/probe_gate_honesty.sh output under mutant m2 === -=== the population, as the REUSE step derives it === - $ git ls-files | wc -l - 126 - This is the whole of the derivation. Everything below is planted into THIS set or - deliberately outside it. - -=== P0 -- the control, and it is the probe failing rather than the check === - An unheadered probe.yaml that is NOT git added. The step derives its population from - git ls-files, so the file does not exist as far as the check is concerned and the step - is RIGHT to say pass. Recorded so no later probe here can be read as proof by accident. - -- P0: unheadered probe-gate-honesty.yaml, NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (126 tracked; 45 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P1 -- .yaml, git added. The extension the old glob ('*.yml') was one letter from === - -- P1: unheadered probe-gate-honesty.yaml, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: - licence files line count: 0 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== P2 -- no extension at all. Nothing a glob on extensions can ever reach === - -- P2: unheadered extensionless PROBEGATEHONESTY, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: - licence files line count: 0 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: PROBEGATEHONESTY - -=== P3 -- .md. Every other .md in this tree carries a header; this step never read one === - -- P3: unheadered probe-gate-honesty.md, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: - licence files line count: 0 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.md - -=== P4 -- the same .yaml with a .license sidecar. Proves P1's FAIL is about the missing - identifier and not about the extension, and that the sidecar route actually works === - -- P4: unheadered probe-gate-honesty.yaml + a sidecar carrying the identifier - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 2 - reuse line : reuse pass (128 tracked; 47 in scope, 44 headered + 3 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P5 -- THE ONE THAT MATTERS FOR THE SECOND DEFECT === - A missing licence file AND an earlier step already red. That pair is the only input - that distinguishes a step-local verdict from one guarded by the shared accumulator: - with `[ "$fail" -eq 0 ] && note "licence files" "pass"`, the line VANISHES. Not a - wrong verdict -- no verdict, in a script whose header promises every step reports one. - Watch 'licence files line count'. Zero is the defect. - - The plant here is an unheadered .sh and NOT the .yaml used above, deliberately: .sh is - in the OLD four-extension population as well as the new one, so this probe turns the - reuse step red under both versions of the script and the only thing that changes - between the before and after runs is the licence-files guard. A probe whose plant is - invisible to the version it is comparing against measures two changes at once. - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 1 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P6 -- the control for P5: a missing licence file with NOTHING else red === - This case worked before the fix and works after it. It is here so the table shows what - is not new coverage, rather than letting P5's result stand for both. - -- P6: LICENSE renamed away, nothing else planted - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (126 tracked; 45 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files FAIL -- LICENSE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - -=== P7 -- the probe P5 was SUPPOSED to be, added because P5 measured identical before - and after and therefore tested nothing === - CORRECTION, APPENDED RATHER THAN SUBSTITUTED. PLAN.md 2a's table predicts that under - the shared accumulator P5 shows the 'licence files' line ABSENT. It does not, and the - before-transcript says so: 'licence files line count: 1', reading 'FAIL -- NOTICE - missing'. Reading the old code explains why -- only the PASS branch was guarded: - - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; fail=1; } <- unguarded - done - [ "$fail" -eq 0 ] && note "licence files" "pass" <- guarded - - So the input that vanishes the line is the OPPOSITE of P5's: an earlier step red while - every licence file is PRESENT. P5 renames NOTICE away and thereby forces the one branch - that always printed. P7 plants the earlier red and leaves the licence files alone. - Before the fix the line count is 0; after it, 1 reading pass. That is the anchor 2b had - none of, and it is the shape this whole slice is about: not a wrong verdict, no verdict. - -- P7: unheadered probe-gate-honesty.sh, ALL licence files present - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: - licence files line count: 0 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P8 -- the sidecar looked up on disk instead of in the tracked set === - P4 proves a sidecar covers its file. It does not ask WHERE the step looked for the - sidecar. The step's population is git ls-files; its sidecar test was `[ -f ]`, a - filesystem test -- so an UNTRACKED sidecar covered a TRACKED file on the author's disk - and did not exist in a fresh clone or in CI. CONVENTIONS.md instance #1, on the - coverage side of the same check. Measured red: logs/red-sidecar-untracked.txt. - -- P8: unheadered probe-gate-honesty.yaml + a sidecar that is NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: - licence files line count: 0 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== what to read === - P1, P2, P3 reuse must FAIL and NAME the file. Under the four-extension glob all - three read pass, because the file was never in the population. - P4 reuse must pass -- the sidecar is the covering mechanism, not an - exception to the population. - P5 'licence files line count' must be 1 and the line must read FAIL. - Under the shared accumulator it is 0. - MEASURED FALSE -- it is 1 under both, see P7. P5 is retained as the - record of a prediction the run refuted, not as coverage. - P7 'licence files line count' must be 1 and the line must read PASS. - Under the shared accumulator it is 0. This is 2b's only real anchor. - P8 reuse must FAIL and name probe-gate-honesty.yaml. With the sidecar - tested by [ -f ] it reads pass and counts the sidecar. - P0, P6 unchanged by either fix, and recorded as such. - -=== cleanup === - git status --porcelain (tracked): empty. Every plant is reverted. -PROBE_EXIT=0 diff --git a/slices/004-gate-honesty/logs/mutation-m3.txt b/slices/004-gate-honesty/logs/mutation-m3.txt deleted file mode 100644 index 36b11cfe..00000000 --- a/slices/004-gate-honesty/logs/mutation-m3.txt +++ /dev/null @@ -1,160 +0,0 @@ -=== MUTANT m3: the ONLY change from the committed tools/gate.sh is === -@@ -100,7 +100,7 @@ while read -r f; do - if head -5 "$f" | grep -q 'SPDX-License-Identifier'; then - n_head=$((n_head + 1)); continue - fi -- if [ -n "${tracked[$f.license]-}" ] && head -5 "$f.license" | grep -q 'SPDX-License-Identifier'; then -+ if [ -f "$f.license" ] && head -5 "$f.license" | grep -q 'SPDX-License-Identifier'; then - n_sidecar=$((n_sidecar + 1)); continue - fi - # Only files that got this far are hashed: the exclusion is consulted where it decides - -=== full ./tools/probe_gate_honesty.sh output under mutant m3 === -=== the population, as the REUSE step derives it === - $ git ls-files | wc -l - 126 - This is the whole of the derivation. Everything below is planted into THIS set or - deliberately outside it. - -=== P0 -- the control, and it is the probe failing rather than the check === - An unheadered probe.yaml that is NOT git added. The step derives its population from - git ls-files, so the file does not exist as far as the check is concerned and the step - is RIGHT to say pass. Recorded so no later probe here can be read as proof by accident. - -- P0: unheadered probe-gate-honesty.yaml, NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (126 tracked; 45 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P1 -- .yaml, git added. The extension the old glob ('*.yml') was one letter from === - -- P1: unheadered probe-gate-honesty.yaml, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== P2 -- no extension at all. Nothing a glob on extensions can ever reach === - -- P2: unheadered extensionless PROBEGATEHONESTY, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: PROBEGATEHONESTY - -=== P3 -- .md. Every other .md in this tree carries a header; this step never read one === - -- P3: unheadered probe-gate-honesty.md, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.md - -=== P4 -- the same .yaml with a .license sidecar. Proves P1's FAIL is about the missing - identifier and not about the extension, and that the sidecar route actually works === - -- P4: unheadered probe-gate-honesty.yaml + a sidecar carrying the identifier - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 2 - reuse line : reuse pass (128 tracked; 47 in scope, 44 headered + 3 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P5 -- THE ONE THAT MATTERS FOR THE SECOND DEFECT === - A missing licence file AND an earlier step already red. That pair is the only input - that distinguishes a step-local verdict from one guarded by the shared accumulator: - with `[ "$fail" -eq 0 ] && note "licence files" "pass"`, the line VANISHES. Not a - wrong verdict -- no verdict, in a script whose header promises every step reports one. - Watch 'licence files line count'. Zero is the defect. - - The plant here is an unheadered .sh and NOT the .yaml used above, deliberately: .sh is - in the OLD four-extension population as well as the new one, so this probe turns the - reuse step red under both versions of the script and the only thing that changes - between the before and after runs is the licence-files guard. A probe whose plant is - invisible to the version it is comparing against measures two changes at once. - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 1 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P6 -- the control for P5: a missing licence file with NOTHING else red === - This case worked before the fix and works after it. It is here so the table shows what - is not new coverage, rather than letting P5's result stand for both. - -- P6: LICENSE renamed away, nothing else planted - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (126 tracked; 45 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files FAIL -- LICENSE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - -=== P7 -- the probe P5 was SUPPOSED to be, added because P5 measured identical before - and after and therefore tested nothing === - CORRECTION, APPENDED RATHER THAN SUBSTITUTED. PLAN.md 2a's table predicts that under - the shared accumulator P5 shows the 'licence files' line ABSENT. It does not, and the - before-transcript says so: 'licence files line count: 1', reading 'FAIL -- NOTICE - missing'. Reading the old code explains why -- only the PASS branch was guarded: - - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; fail=1; } <- unguarded - done - [ "$fail" -eq 0 ] && note "licence files" "pass" <- guarded - - So the input that vanishes the line is the OPPOSITE of P5's: an earlier step red while - every licence file is PRESENT. P5 renames NOTICE away and thereby forces the one branch - that always printed. P7 plants the earlier red and leaves the licence files alone. - Before the fix the line count is 0; after it, 1 reading pass. That is the anchor 2b had - none of, and it is the shape this whole slice is about: not a wrong verdict, no verdict. - -- P7: unheadered probe-gate-honesty.sh, ALL licence files present - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P8 -- the sidecar looked up on disk instead of in the tracked set === - P4 proves a sidecar covers its file. It does not ask WHERE the step looked for the - sidecar. The step's population is git ls-files; its sidecar test was `[ -f ]`, a - filesystem test -- so an UNTRACKED sidecar covered a TRACKED file on the author's disk - and did not exist in a fresh clone or in CI. CONVENTIONS.md instance #1, on the - coverage side of the same check. Measured red: logs/red-sidecar-untracked.txt. - -- P8: unheadered probe-gate-honesty.yaml + a sidecar that is NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (127 tracked; 46 in scope, 43 headered + 3 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== what to read === - P1, P2, P3 reuse must FAIL and NAME the file. Under the four-extension glob all - three read pass, because the file was never in the population. - P4 reuse must pass -- the sidecar is the covering mechanism, not an - exception to the population. - P5 'licence files line count' must be 1 and the line must read FAIL. - Under the shared accumulator it is 0. - MEASURED FALSE -- it is 1 under both, see P7. P5 is retained as the - record of a prediction the run refuted, not as coverage. - P7 'licence files line count' must be 1 and the line must read PASS. - Under the shared accumulator it is 0. This is 2b's only real anchor. - P8 reuse must FAIL and name probe-gate-honesty.yaml. With the sidecar - tested by [ -f ] it reads pass and counts the sidecar. - P0, P6 unchanged by either fix, and recorded as such. - -=== cleanup === - git status --porcelain (tracked): empty. Every plant is reverted. -PROBE_EXIT=0 diff --git a/slices/004-gate-honesty/logs/probe-archive-tally-after.txt b/slices/004-gate-honesty/logs/probe-archive-tally-after.txt deleted file mode 100644 index cd957471..00000000 --- a/slices/004-gate-honesty/logs/probe-archive-tally-after.txt +++ /dev/null @@ -1,98 +0,0 @@ -=== the population, as the tally derives it, BEFORE the plant === - $ git ls-files -- "slices/001b-ping-guard/logs/*" | wc -l - 29 - $ git ls-files -- "slices/001b-ping-guard/logs/mutation-*" - slices/001b-ping-guard/logs/mutation-a.txt - slices/001b-ping-guard/logs/mutation-b.txt - slices/001b-ping-guard/logs/mutation-readme-a.txt - slices/001b-ping-guard/logs/mutation-readme-b.txt - -=== the plant: a tracked rename inside that population === - $ git mv slices/001b-ping-guard/logs/mutation-a.txt slices/001b-ping-guard/logs/mutation-c.txt - -=== the population AFTER the plant, from the same command === - $ git ls-files -- "slices/001b-ping-guard/logs/*" | wc -l - 29 - $ git ls-files -- "slices/001b-ping-guard/logs/mutation-*" - slices/001b-ping-guard/logs/mutation-b.txt - slices/001b-ping-guard/logs/mutation-c.txt - slices/001b-ping-guard/logs/mutation-readme-a.txt - slices/001b-ping-guard/logs/mutation-readme-b.txt - - The count is unchanged. mutation-c.txt is enumerated and is classified by nothing: - the sweep's mutation loop is `for m in a b`, so it still calls verdict() for the - now-absent mutation-a.txt. One file left the population, another took its slot, and - the two counts the tally compares are both unchanged. - -=== ./tools/archive_sweep.sh under the plant === - SWEEP_EXIT=1 - - -- every verdict line -- - => full-suite.txt DIFFERS (the diff above is the difference) - => green-negotiation.txt RAW (0 differing lines above) - => gate.txt DIFFERS (the diff above is the difference) - => probe-after.txt DIFFERS (the diff above is the difference) - => red.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => mutation-a.txt DIFFERS (a mark is missing; a filtered capture would look like this) - => mutation-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => mutation-readme-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => mutation-readme-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => spec-basic-versioning.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning.md) - => spec-changelog.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/changelog.md) - => spec-legacy-basic.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2025-11-25/basic.md) - => archive-sweep.txt RAW (self: named check above, not an assertion) - => ENUMERATED BUT NOT CLASSIFIED -- unclassified is NOT the same as RAW: - => CLASSIFIED BUT NOT ENUMERATED -- a verdict was printed for a path that is not in - - -- the closing tally, verbatim -- - === CLOSING TALLY -- names, because counts were the loophole === - Round 5 enumerated red.txt and classified it nowhere: 19 listed, 18 classified, and - the output still read as a clean sweep because nothing counted. A file could drop out - QUIETLY -- CONVENTIONS.md's own worst shape, and this script's header says a list is - not a population. - - Counting closed one shape and left another. 'Every enumerated file is classified' is a - claim about NAMES, and two integers cannot carry it: rename one file inside the - population and the loop above still hands a verdict to the name that left, so both - integers are unchanged and the tally reads BALANCES over a file nothing looked at. - Measured, not imagined -- ./tools/probe_archive_tally.sh renames mutation-a.txt to - mutation-c.txt and the counting version printed 'enumerated : 29 / classified : 29 / - TALLY BALANCES' while giving mutation-a.txt a verdict though the file did not exist. - - So the comparison is now between two SETS OF PATHS, printed in BOTH directions. - The second direction is the one a counter can never see. - enumerated : 29 - classified : 29 (13 verdicts + 16 authored lane reports) - => ENUMERATED BUT NOT CLASSIFIED -- unclassified is NOT the same as RAW: - slices/001b-ping-guard/logs/mutation-c.txt - => CLASSIFIED BUT NOT ENUMERATED -- a verdict was printed for a path that is not in - the population. Either the file left the tracked set or a hand-written loop names - something that does not exist: - slices/001b-ping-guard/logs/mutation-a.txt - Do not read this sweep as clean. - - === EXIT STATUS === - SWEEP FAILED: at least one DIFFERS, UNCHECKED, or tally mismatch above. - A DIFFERS is not by itself evidence of fabrication. This script re-runs each command - against the CURRENT tree, so an archive captured at an earlier tree differs because - the tree moved. What the exit status now says is 'a human must read this', which is - what it always should have said and did not. - - -- is mutation-c.txt CLASSIFIED anywhere? Count verdict lines, not mentions: the - file is named once by the population echo at the top of the sweep, and a mention - is not a classification -- which is the distinction this whole probe is about. -- - $ grep -c '=> .*mutation-c' - 0 - -- and is mutation-a.txt still given a verdict, though it does not exist? -- - $ grep '=> .*mutation-a' - => mutation-a.txt DIFFERS (a mark is missing; a filtered capture would look like this) - -=== VERDICT OF THIS PROBE === - A tally that compares names must FAIL here and name both directions: - mutation-c.txt enumerated, classified nowhere - mutation-a.txt classified, no longer enumerated - A tally that compares counts reports TALLY BALANCES and exits 0. - Read the two lines above, not this sentence. - -=== cleanup: the plant is reverted and the tree is asserted clean === - git status --porcelain (tracked): empty. The tree is as it was. diff --git a/slices/004-gate-honesty/logs/probe-archive-tally-before.txt b/slices/004-gate-honesty/logs/probe-archive-tally-before.txt deleted file mode 100644 index 7ba5c411..00000000 --- a/slices/004-gate-honesty/logs/probe-archive-tally-before.txt +++ /dev/null @@ -1,74 +0,0 @@ -=== the population, as the tally derives it, BEFORE the plant === - $ git ls-files -- "slices/001b-ping-guard/logs/*" | wc -l - 29 - $ git ls-files -- "slices/001b-ping-guard/logs/mutation-*" - slices/001b-ping-guard/logs/mutation-a.txt - slices/001b-ping-guard/logs/mutation-b.txt - slices/001b-ping-guard/logs/mutation-readme-a.txt - slices/001b-ping-guard/logs/mutation-readme-b.txt - -=== the plant: a tracked rename inside that population === - $ git mv slices/001b-ping-guard/logs/mutation-a.txt slices/001b-ping-guard/logs/mutation-c.txt - -=== the population AFTER the plant, from the same command === - $ git ls-files -- "slices/001b-ping-guard/logs/*" | wc -l - 29 - $ git ls-files -- "slices/001b-ping-guard/logs/mutation-*" - slices/001b-ping-guard/logs/mutation-b.txt - slices/001b-ping-guard/logs/mutation-c.txt - slices/001b-ping-guard/logs/mutation-readme-a.txt - slices/001b-ping-guard/logs/mutation-readme-b.txt - - The count is unchanged. mutation-c.txt is enumerated and is classified by nothing: - the sweep's mutation loop is `for m in a b`, so it still calls verdict() for the - now-absent mutation-a.txt. One file left the population, another took its slot, and - the two counts the tally compares are both unchanged. - -=== ./tools/archive_sweep.sh under the plant === - SWEEP_EXIT=0 - - -- every verdict line -- - => full-suite.txt DIFFERS (the diff above is the difference) - => green-negotiation.txt RAW (0 differing lines above) - => gate.txt DIFFERS (the diff above is the difference) - => probe-after.txt DIFFERS (the diff above is the difference) - => red.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => mutation-a.txt DIFFERS (a mark is missing; a filtered capture would look like this) - => mutation-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => mutation-readme-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => mutation-readme-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - => spec-basic-versioning.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning.md) - => spec-changelog.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/changelog.md) - => spec-legacy-basic.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2025-11-25/basic.md) - => archive-sweep.txt RAW (self: named check above, not an assertion) - => TALLY BALANCES: every enumerated file is classified. - - -- the closing tally, verbatim -- - === CLOSING TALLY -- the structural fix, not an instance fix === - Round 5 enumerated red.txt and classified it nowhere: 19 listed, 18 classified, and - the output still read as a clean sweep because nothing counted. A file could drop out - QUIETLY -- CONVENTIONS.md's own worst shape, and this script's header says a list is - not a population. So the population and the classifications are now counted and - compared, and disagreement is a FAILURE of this script rather than a silent gap. - enumerated : 29 - classified : 29 (13 verdicts + 16 authored lane reports) - => TALLY BALANCES: every enumerated file is classified. - - -- is mutation-c.txt CLASSIFIED anywhere? Count verdict lines, not mentions: the - file is named once by the population echo at the top of the sweep, and a mention - is not a classification -- which is the distinction this whole probe is about. -- - $ grep -c '=> .*mutation-c' - 0 - -- and is mutation-a.txt still given a verdict, though it does not exist? -- - $ grep '=> .*mutation-a' - => mutation-a.txt DIFFERS (a mark is missing; a filtered capture would look like this) - -=== VERDICT OF THIS PROBE === - A tally that compares names must FAIL here and name both directions: - mutation-c.txt enumerated, classified nowhere - mutation-a.txt classified, no longer enumerated - A tally that compares counts reports TALLY BALANCES and exits 0. - Read the two lines above, not this sentence. - -=== cleanup: the plant is reverted and the tree is asserted clean === - git status --porcelain (tracked): empty. The tree is as it was. diff --git a/slices/004-gate-honesty/logs/probe-gate-honesty-after.txt b/slices/004-gate-honesty/logs/probe-gate-honesty-after.txt deleted file mode 100644 index bbcbc2ca..00000000 --- a/slices/004-gate-honesty/logs/probe-gate-honesty-after.txt +++ /dev/null @@ -1,148 +0,0 @@ -=== the population, as the REUSE step derives it === - $ git ls-files | wc -l - 126 - This is the whole of the derivation. Everything below is planted into THIS set or - deliberately outside it. - -=== P0 -- the control, and it is the probe failing rather than the check === - An unheadered probe.yaml that is NOT git added. The step derives its population from - git ls-files, so the file does not exist as far as the check is concerned and the step - is RIGHT to say pass. Recorded so no later probe here can be read as proof by accident. - -- P0: unheadered probe-gate-honesty.yaml, NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (126 tracked; 45 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P1 -- .yaml, git added. The extension the old glob ('*.yml') was one letter from === - -- P1: unheadered probe-gate-honesty.yaml, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== P2 -- no extension at all. Nothing a glob on extensions can ever reach === - -- P2: unheadered extensionless PROBEGATEHONESTY, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: PROBEGATEHONESTY - -=== P3 -- .md. Every other .md in this tree carries a header; this step never read one === - -- P3: unheadered probe-gate-honesty.md, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.md - -=== P4 -- the same .yaml with a .license sidecar. Proves P1's FAIL is about the missing - identifier and not about the extension, and that the sidecar route actually works === - -- P4: unheadered probe-gate-honesty.yaml + a sidecar carrying the identifier - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 2 - reuse line : reuse pass (128 tracked; 47 in scope, 44 headered + 3 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P5 -- THE ONE THAT MATTERS FOR THE SECOND DEFECT === - A missing licence file AND an earlier step already red. That pair is the only input - that distinguishes a step-local verdict from one guarded by the shared accumulator: - with `[ "$fail" -eq 0 ] && note "licence files" "pass"`, the line VANISHES. Not a - wrong verdict -- no verdict, in a script whose header promises every step reports one. - Watch 'licence files line count'. Zero is the defect. - - The plant here is an unheadered .sh and NOT the .yaml used above, deliberately: .sh is - in the OLD four-extension population as well as the new one, so this probe turns the - reuse step red under both versions of the script and the only thing that changes - between the before and after runs is the licence-files guard. A probe whose plant is - invisible to the version it is comparing against measures two changes at once. - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 1 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P6 -- the control for P5: a missing licence file with NOTHING else red === - This case worked before the fix and works after it. It is here so the table shows what - is not new coverage, rather than letting P5's result stand for both. - -- P6: LICENSE renamed away, nothing else planted - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (126 tracked; 45 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files FAIL -- LICENSE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - -=== P7 -- the probe P5 was SUPPOSED to be, added because P5 measured identical before - and after and therefore tested nothing === - CORRECTION, APPENDED RATHER THAN SUBSTITUTED. PLAN.md 2a's table predicts that under - the shared accumulator P5 shows the 'licence files' line ABSENT. It does not, and the - before-transcript says so: 'licence files line count: 1', reading 'FAIL -- NOTICE - missing'. Reading the old code explains why -- only the PASS branch was guarded: - - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; fail=1; } <- unguarded - done - [ "$fail" -eq 0 ] && note "licence files" "pass" <- guarded - - So the input that vanishes the line is the OPPOSITE of P5's: an earlier step red while - every licence file is PRESENT. P5 renames NOTICE away and thereby forces the one branch - that always printed. P7 plants the earlier red and leaves the licence files alone. - Before the fix the line count is 0; after it, 1 reading pass. That is the anchor 2b had - none of, and it is the shape this whole slice is about: not a wrong verdict, no verdict. - -- P7: unheadered probe-gate-honesty.sh, ALL licence files present - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P8 -- the sidecar looked up on disk instead of in the tracked set === - P4 proves a sidecar covers its file. It does not ask WHERE the step looked for the - sidecar. The step's population is git ls-files; its sidecar test was `[ -f ]`, a - filesystem test -- so an UNTRACKED sidecar covered a TRACKED file on the author's disk - and did not exist in a fresh clone or in CI. CONVENTIONS.md instance #1, on the - coverage side of the same check. Measured red: logs/red-sidecar-untracked.txt. - -- P8: unheadered probe-gate-honesty.yaml + a sidecar that is NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (127 tracked; 46 in scope, 43 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== what to read === - P1, P2, P3 reuse must FAIL and NAME the file. Under the four-extension glob all - three read pass, because the file was never in the population. - P4 reuse must pass -- the sidecar is the covering mechanism, not an - exception to the population. - P5 'licence files line count' must be 1 and the line must read FAIL. - Under the shared accumulator it is 0. - MEASURED FALSE -- it is 1 under both, see P7. P5 is retained as the - record of a prediction the run refuted, not as coverage. - P7 'licence files line count' must be 1 and the line must read PASS. - Under the shared accumulator it is 0. This is 2b's only real anchor. - P8 reuse must FAIL and name probe-gate-honesty.yaml. With the sidecar - tested by [ -f ] it reads pass and counts the sidecar. - P0, P6 unchanged by either fix, and recorded as such. - -=== cleanup === - git status --porcelain (tracked): empty. Every plant is reverted. diff --git a/slices/004-gate-honesty/logs/probe-gate-honesty-before.txt b/slices/004-gate-honesty/logs/probe-gate-honesty-before.txt deleted file mode 100644 index 3b3fecf4..00000000 --- a/slices/004-gate-honesty/logs/probe-gate-honesty-before.txt +++ /dev/null @@ -1,98 +0,0 @@ -=== the population, as the REUSE step derives it === - $ git ls-files | wc -l - 123 - This is the whole of the derivation. Everything below is planted into THIS set or - deliberately outside it. - -=== P0 -- the control, and it is the probe failing rather than the check === - An unheadered probe.yaml that is NOT git added. The step derives its population from - git ls-files, so the file does not exist as far as the check is concerned and the step - is RIGHT to say pass. Recorded so no later probe here can be read as proof by accident. - -- P0: unheadered probe-gate-honesty.yaml, NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (25 commentable files) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P1 -- .yaml, git added. The extension the old glob ('*.yml') was one letter from === - -- P1: unheadered probe-gate-honesty.yaml, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (25 commentable files) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P2 -- no extension at all. Nothing a glob on extensions can ever reach === - -- P2: unheadered extensionless PROBEGATEHONESTY, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (25 commentable files) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P3 -- .md. Every other .md in this tree carries a header; this step never read one === - -- P3: unheadered probe-gate-honesty.md, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse pass (25 commentable files) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P4 -- the same .yaml with a .license sidecar. Proves P1's FAIL is about the missing - identifier and not about the extension, and that the sidecar route actually works === - -- P4: unheadered probe-gate-honesty.yaml + a sidecar carrying the identifier - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 2 - reuse line : reuse pass (25 commentable files) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P5 -- THE ONE THAT MATTERS FOR THE SECOND DEFECT === - A missing licence file AND an earlier step already red. That pair is the only input - that distinguishes a step-local verdict from one guarded by the shared accumulator: - with `[ "$fail" -eq 0 ] && note "licence files" "pass"`, the line VANISHES. Not a - wrong verdict -- no verdict, in a script whose header promises every step reports one. - Watch 'licence files line count'. Zero is the defect. - - The plant here is an unheadered .sh and NOT the .yaml used above, deliberately: .sh is - in the OLD four-extension population as well as the new one, so this probe turns the - reuse step red under both versions of the script and the only thing that changes - between the before and after runs is the licence-files guard. A probe whose plant is - invisible to the version it is comparing against measures two changes at once. - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL -- no SPDX-License-Identifier: - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P6 -- the control for P5: a missing licence file with NOTHING else red === - This case worked before the fix and works after it. It is here so the table shows what - is not new coverage, rather than letting P5's result stand for both. - -- P6: LICENSE renamed away, nothing else planted - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (25 commentable files) - licence files line: licence files FAIL -- LICENSE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - -=== what to read === - P1, P2, P3 reuse must FAIL and NAME the file. Under the four-extension glob all - three read pass, because the file was never in the population. - P4 reuse must pass -- the sidecar is the covering mechanism, not an - exception to the population. - P5 'licence files line count' must be 1 and the line must read FAIL. - Under the shared accumulator it is 0. - P0, P6 unchanged by either fix, and recorded as such. - -=== cleanup === - git status --porcelain (tracked): empty. Every plant is reverted. diff --git a/slices/004-gate-honesty/logs/probe-gate-honesty-round2.txt b/slices/004-gate-honesty/logs/probe-gate-honesty-round2.txt deleted file mode 100644 index 3bf2cee4..00000000 --- a/slices/004-gate-honesty/logs/probe-gate-honesty-round2.txt +++ /dev/null @@ -1,169 +0,0 @@ -=== the population, as the REUSE step derives it === - $ git ls-files | wc -l - 153 - This is the whole of the derivation. Everything below is planted into THIS set or - deliberately outside it. - -=== P0 -- the control, and it is the probe failing rather than the check === - An unheadered probe.yaml that is NOT git added. The step derives its population from - git ls-files, so the file does not exist as far as the check is concerned and the step - is RIGHT to say pass. Recorded so no later probe here can be read as proof by accident. - -- P0: unheadered probe-gate-honesty.yaml, NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (153 tracked; 51 in scope, 49 headered + 2 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P1 -- .yaml, git added. The extension the old glob ('*.yml') was one letter from === - -- P1: unheadered probe-gate-honesty.yaml, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (154 tracked; 52 in scope, 49 headered + 2 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== P2 -- no extension at all. Nothing a glob on extensions can ever reach === - -- P2: unheadered extensionless PROBEGATEHONESTY, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (154 tracked; 52 in scope, 49 headered + 2 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: PROBEGATEHONESTY - -=== P3 -- .md. Every other .md in this tree carries a header; this step never read one === - -- P3: unheadered probe-gate-honesty.md, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (154 tracked; 52 in scope, 49 headered + 2 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.md - -=== P4 -- the same .yaml with a .license sidecar. Proves P1's FAIL is about the missing - identifier and not about the extension, and that the sidecar route actually works === - -- P4: unheadered probe-gate-honesty.yaml + a sidecar carrying the identifier - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 2 - reuse line : reuse pass (155 tracked; 53 in scope, 50 headered + 3 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P5 -- THE ONE THAT MATTERS FOR THE SECOND DEFECT === - A missing licence file AND an earlier step already red. That pair is the only input - that distinguishes a step-local verdict from one guarded by the shared accumulator: - with `[ "$fail" -eq 0 ] && note "licence files" "pass"`, the line VANISHES. Not a - wrong verdict -- no verdict, in a script whose header promises every step reports one. - Watch 'licence files line count'. Zero is the defect. - - The plant here is an unheadered .sh and NOT the .yaml used above, deliberately: .sh is - in the OLD four-extension population as well as the new one, so this probe turns the - reuse step red under both versions of the script and the only thing that changes - between the before and after runs is the licence-files guard. A probe whose plant is - invisible to the version it is comparing against measures two changes at once. - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (154 tracked; 52 in scope, 49 headered + 1 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P6 -- the control for P5: a missing licence file with NOTHING else red === - This case worked before the fix and works after it. It is here so the table shows what - is not new coverage, rather than letting P5's result stand for both. - -- P6: LICENSE renamed away, nothing else planted - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (153 tracked; 51 in scope, 49 headered + 2 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files FAIL -- LICENSE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - -=== P7 -- the probe P5 was SUPPOSED to be, added because P5 measured identical before - and after and therefore tested nothing === - CORRECTION, APPENDED RATHER THAN SUBSTITUTED. PLAN.md 2a's table predicts that under - the shared accumulator P5 shows the 'licence files' line ABSENT. It does not, and the - before-transcript says so: 'licence files line count: 1', reading 'FAIL -- NOTICE - missing'. Reading the old code explains why -- only the PASS branch was guarded: - - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; fail=1; } <- unguarded - done - [ "$fail" -eq 0 ] && note "licence files" "pass" <- guarded - - So the input that vanishes the line is the OPPOSITE of P5's: an earlier step red while - every licence file is PRESENT. P5 renames NOTICE away and thereby forces the one branch - that always printed. P7 plants the earlier red and leaves the licence files alone. - Before the fix the line count is 0; after it, 1 reading pass. That is the anchor 2b had - none of, and it is the shape this whole slice is about: not a wrong verdict, no verdict. - -- P7: unheadered probe-gate-honesty.sh, ALL licence files present - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (154 tracked; 52 in scope, 49 headered + 2 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P8 -- the sidecar looked up on disk instead of in the tracked set === - P4 proves a sidecar covers its file. It does not ask WHERE the step looked for the - sidecar. The step's population is git ls-files; its sidecar test was `[ -f ]`, a - filesystem test -- so an UNTRACKED sidecar covered a TRACKED file on the author's disk - and did not exist in a fresh clone or in CI. CONVENTIONS.md instance #1, on the - coverage side of the same check. Measured red: logs/red-sidecar-untracked.txt. - -- P8: unheadered probe-gate-honesty.yaml + a sidecar that is NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (154 tracked; 52 in scope, 49 headered + 2 sidecar; excluded 100 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== P9 -- the step must run on the bash a developer actually has === - Not a plant: an assertion over tools/gate.sh's own text, and it can fail -- put a - `declare -A` back on a live line and this probe goes red. - - Round 1 measured what the associative array does on bash 3.2, the bash every stock - macOS ships. It has no -A, so `tracked[$f]` is an INDEXED array subscript evaluated - as ARITHMETIC; `.formatter.exs` is not an arithmetic expression, the expansion is - fatal to its command, and both loops abort at the first offending path: - - reuse pass (10 tracked; 10 in scope, 9 headered + 0 sidecar; excluded 0 archive + 0 licence text) - Gate OK. - EXIT=0 - - Ten files out of 145, reported as pass, exit 0 -- this step's own defect reintroduced - by the fix for it, with two stderr lines as the only sign. So the construct is barred - rather than commented, and comment lines are stripped before looking, because the - explanation above legitimately contains the string. - -- P9: no bash-4-only construct on a live line of tools/gate.sh -> pass - -=== what to read === - P1, P2, P3 reuse must FAIL and NAME the file. Under the four-extension glob all - three read pass, because the file was never in the population. - P4 reuse must pass -- the sidecar is the covering mechanism, not an - exception to the population. - P5 'licence files line count' must be 1 and the line must read FAIL. - Under the shared accumulator it is 0. - MEASURED FALSE -- it is 1 under both, see P7. P5 is retained as the - record of a prediction the run refuted, not as coverage. - P7 'licence files line count' must be 1 and the line must read PASS. - Under the shared accumulator it is 0. This is 2b's only real anchor. - P8 reuse must FAIL and name probe-gate-honesty.yaml. With the sidecar - tested by [ -f ] it reads pass and counts the sidecar. - P0, P6 unchanged by either fix, and recorded as such. - P9 must read pass. It is the only probe here that reads the script - rather than running it, because bash 3.2 is not available to run. - -=== cleanup === - git status --porcelain (tracked): empty. Every plant is reverted. diff --git a/slices/004-gate-honesty/logs/probe-gate-honesty-round3.txt b/slices/004-gate-honesty/logs/probe-gate-honesty-round3.txt deleted file mode 100644 index 07e1aa91..00000000 --- a/slices/004-gate-honesty/logs/probe-gate-honesty-round3.txt +++ /dev/null @@ -1,169 +0,0 @@ -=== the population, as the REUSE step derives it === - $ git ls-files | wc -l - 160 - This is the whole of the derivation. Everything below is planted into THIS set or - deliberately outside it. - -=== P0 -- the control, and it is the probe failing rather than the check === - An unheadered probe.yaml that is NOT git added. The step derives its population from - git ls-files, so the file does not exist as far as the check is concerned and the step - is RIGHT to say pass. Recorded so no later probe here can be read as proof by accident. - -- P0: unheadered probe-gate-honesty.yaml, NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (160 tracked; 53 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P1 -- .yaml, git added. The extension the old glob ('*.yml') was one letter from === - -- P1: unheadered probe-gate-honesty.yaml, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (161 tracked; 54 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== P2 -- no extension at all. Nothing a glob on extensions can ever reach === - -- P2: unheadered extensionless PROBEGATEHONESTY, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (161 tracked; 54 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: PROBEGATEHONESTY - -=== P3 -- .md. Every other .md in this tree carries a header; this step never read one === - -- P3: unheadered probe-gate-honesty.md, git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (161 tracked; 54 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.md - -=== P4 -- the same .yaml with a .license sidecar. Proves P1's FAIL is about the missing - identifier and not about the extension, and that the sidecar route actually works === - -- P4: unheadered probe-gate-honesty.yaml + a sidecar carrying the identifier - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 2 - reuse line : reuse pass (162 tracked; 55 in scope, 52 headered + 3 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=0 - -=== P5 -- THE ONE THAT MATTERS FOR THE SECOND DEFECT === - A missing licence file AND an earlier step already red. That pair is the only input - that distinguishes a step-local verdict from one guarded by the shared accumulator: - with `[ "$fail" -eq 0 ] && note "licence files" "pass"`, the line VANISHES. Not a - wrong verdict -- no verdict, in a script whose header promises every step reports one. - Watch 'licence files line count'. Zero is the defect. - - The plant here is an unheadered .sh and NOT the .yaml used above, deliberately: .sh is - in the OLD four-extension population as well as the new one, so this probe turns the - reuse step red under both versions of the script and the only thing that changes - between the before and after runs is the licence-files guard. A probe whose plant is - invisible to the version it is comparing against measures two changes at once. - -- P5: unheadered probe-gate-honesty.sh (reuse red under BOTH populations) + NOTICE renamed away - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (161 tracked; 54 in scope, 51 headered + 1 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files FAIL -- NOTICE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P6 -- the control for P5: a missing licence file with NOTHING else red === - This case worked before the fix and works after it. It is here so the table shows what - is not new coverage, rather than letting P5's result stand for both. - -- P6: LICENSE renamed away, nothing else planted - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 0 - reuse line : reuse pass (160 tracked; 53 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files FAIL -- LICENSE missing - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - -=== P7 -- the probe P5 was SUPPOSED to be, added because P5 measured identical before - and after and therefore tested nothing === - CORRECTION, APPENDED RATHER THAN SUBSTITUTED. PLAN.md 2a's table predicts that under - the shared accumulator P5 shows the 'licence files' line ABSENT. It does not, and the - before-transcript says so: 'licence files line count: 1', reading 'FAIL -- NOTICE - missing'. Reading the old code explains why -- only the PASS branch was guarded: - - for f in LICENSE NOTICE LICENSES/Apache-2.0.txt; do - [ -f "$f" ] || { note "licence files" "FAIL -- $f missing"; fail=1; } <- unguarded - done - [ "$fail" -eq 0 ] && note "licence files" "pass" <- guarded - - So the input that vanishes the line is the OPPOSITE of P5's: an earlier step red while - every licence file is PRESENT. P5 renames NOTICE away and thereby forces the one branch - that always printed. P7 plants the earlier red and leaves the licence files alone. - Before the fix the line count is 0; after it, 1 reading pass. That is the anchor 2b had - none of, and it is the shape this whole slice is about: not a wrong verdict, no verdict. - -- P7: unheadered probe-gate-honesty.sh, ALL licence files present - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (161 tracked; 54 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.sh - -=== P8 -- the sidecar looked up on disk instead of in the tracked set === - P4 proves a sidecar covers its file. It does not ask WHERE the step looked for the - sidecar. The step's population is git ls-files; its sidecar test was `[ -f ]`, a - filesystem test -- so an UNTRACKED sidecar covered a TRACKED file on the author's disk - and did not exist in a fresh clone or in CI. CONVENTIONS.md instance #1, on the - coverage side of the same check. Measured red: logs/red-sidecar-untracked.txt. - -- P8: unheadered probe-gate-honesty.yaml + a sidecar that is NOT git added - in the population? $ git ls-files | grep -c '^probe\|^PROBE' -> 1 - reuse line : reuse FAIL (161 tracked; 54 in scope, 51 headered + 2 sidecar; excluded 105 archive + 2 licence text) - licence files line: licence files pass - licence files line count: 1 (0 means the step printed NOTHING) - other steps not pass: 0 (so the objection above is this step, not a side effect) - GATE_EXIT=1 - named by the step: probe-gate-honesty.yaml - -=== P9 -- the step must run on the bash a developer actually has === - Not a plant: an assertion over tools/gate.sh's own text, and it can fail -- put a - `declare -A` back on a live line and this probe goes red. - - Round 1 measured what the associative array does on bash 3.2, the bash every stock - macOS ships. It has no -A, so `tracked[$f]` is an INDEXED array subscript evaluated - as ARITHMETIC; `.formatter.exs` is not an arithmetic expression, the expansion is - fatal to its command, and both loops abort at the first offending path: - - reuse pass (10 tracked; 10 in scope, 9 headered + 0 sidecar; excluded 0 archive + 0 licence text) - Gate OK. - EXIT=0 - - Ten files out of 145, reported as pass, exit 0 -- this step's own defect reintroduced - by the fix for it, with two stderr lines as the only sign. So the construct is barred - rather than commented, and comment lines are stripped before looking, because the - explanation above legitimately contains the string. - -- P9: no bash-4-only construct on a live line of tools/gate.sh -> pass - -=== what to read === - P1, P2, P3 reuse must FAIL and NAME the file. Under the four-extension glob all - three read pass, because the file was never in the population. - P4 reuse must pass -- the sidecar is the covering mechanism, not an - exception to the population. - P5 'licence files line count' must be 1 and the line must read FAIL. - Under the shared accumulator it is 0. - MEASURED FALSE -- it is 1 under both, see P7. P5 is retained as the - record of a prediction the run refuted, not as coverage. - P7 'licence files line count' must be 1 and the line must read PASS. - Under the shared accumulator it is 0. This is 2b's only real anchor. - P8 reuse must FAIL and name probe-gate-honesty.yaml. With the sidecar - tested by [ -f ] it reads pass and counts the sidecar. - P0, P6 unchanged by either fix, and recorded as such. - P9 must read pass. It is the only probe here that reads the script - rather than running it, because bash 3.2 is not available to run. - -=== cleanup === - git status --porcelain (tracked): empty. Every plant is reverted. diff --git a/slices/004-gate-honesty/logs/probe-signoff.txt b/slices/004-gate-honesty/logs/probe-signoff.txt deleted file mode 100644 index e05d94b6..00000000 --- a/slices/004-gate-honesty/logs/probe-signoff.txt +++ /dev/null @@ -1,140 +0,0 @@ -=== tools/signoff.sh probes === - tool under test: /home/aylac/Projects/beam_mcp-wt/004-gate-honesty/tools/signoff.sh - ---- S1: two approve records at tree T, both committed. verify must exit 0 --- -recorded: slices/test-slice/signoff/round1.r1.signoff - verdict: approve - tree: 4e42d919befc267dfc80037ac28b20a310eca20c - commit: b2cec138a15081ca0e1d6503a25217dde47592d7 -recorded: slices/test-slice/signoff/round1.r2.signoff - verdict: approve - tree: 4e42d919befc267dfc80037ac28b20a310eca20c - commit: b2cec138a15081ca0e1d6503a25217dde47592d7 - the two records name the same tree: - tree: 4e42d919befc267dfc80037ac28b20a310eca20c -== signoff verify: slices/test-slice == - review tree (HEAD's tree, slices/*/signoff/ removed): 4e42d919befc267dfc80037ac28b20a310eca20c - deciding round: 1 (earlier rounds are history and do not block) - round 1 r1: approve, on the current review tree - round 1 r2: approve, on the current review tree - round 1: 2 record(s), all approve, all on the tree in front of you. - (2 record(s) in total, including superseded rounds.) - wrote slices/test-slice/signoff/verify.txt - S1 AS EXPECTED (want 0, got exit 0) committing the records must not invalidate them - ---- S2: S1, then a real commit changing a tracked file. verify must refuse, both STALE --- - == signoff verify: slices/test-slice == - review tree (HEAD's tree, slices/*/signoff/ removed): 0047ec9c5e1556ebe9096bd7a4306fb93e328925 - deciding round: 1 (earlier rounds are history and do not block) - round 1 r1: STALE - read: 4e42d919befc267dfc80037ac28b20a310eca20c - now: 0047ec9c5e1556ebe9096bd7a4306fb93e328925 - round 1 r2: STALE - read: 4e42d919befc267dfc80037ac28b20a310eca20c - now: 0047ec9c5e1556ebe9096bd7a4306fb93e328925 - A stale record is slice 001b's failure: the tree moved after the lanes approved it. - SIGNOFF REFUSED -- slices/test-slice is not signed off. - S2 AS EXPECTED (want nonzero, got exit 1) this is slice 001b's failure, mechanised - ---- S3: S1, then a commit changing ONLY slices/*/signoff/. verify must still exit 0 --- - The exclusion is load-bearing and this proves it rather than asserting it. - that commit changed only: - slices/test-slice/signoff/verify.txt -== signoff verify: slices/test-slice == - review tree (HEAD's tree, slices/*/signoff/ removed): 4e42d919befc267dfc80037ac28b20a310eca20c - deciding round: 1 (earlier rounds are history and do not block) - round 1 r1: approve, on the current review tree - round 1 r2: approve, on the current review tree - round 1: 2 record(s), all approve, all on the tree in front of you. - (2 record(s) in total, including superseded rounds.) - wrote slices/test-slice/signoff/verify.txt - S3 AS EXPECTED (want 0, got exit 0) a commit inside the excluded directory must not move the reviewed tree - ---- S4: no records at all. verify must refuse --- - If this passes, the tool is the defect it was written against. - SIGNOFF REFUSED -- slices/test-slice/signoff/ holds no *.signoff records. Nothing to check is not a pass. - S4 AS EXPECTED (want nonzero, got exit 1) nothing to check is not a pass - ---- S5: one approve, one changes-required. verify must refuse --- - == signoff verify: slices/test-slice == - review tree (HEAD's tree, slices/*/signoff/ removed): 4e42d919befc267dfc80037ac28b20a310eca20c - deciding round: 1 (earlier rounds are history and do not block) - round 1 r1: approve, on the current review tree - round 1 r2: CHANGES-REQUIRED - SIGNOFF REFUSED -- slices/test-slice is not signed off. - S5 AS EXPECTED (want nonzero, got exit 1) one lane objecting is the round objecting - ---- S6: a stray notes.txt under slices/*/signoff/. verify must refuse --- - Excluded from the reviewed tree must not become a place to put things. - SIGNOFF REFUSED -- slices/test-slice/signoff/notes.txt is not a *.signoff record. slices/test-slice/signoff/ is excluded from the reviewed tree and may hold nothing else. - S6 AS EXPECTED (want nonzero, got exit 1) the exclusion is policed, not just documented - ---- S7: a record with its 'tree:' line deleted. verify must REFUSE, not skip --- - == signoff verify: slices/test-slice == - review tree (HEAD's tree, slices/*/signoff/ removed): 4e42d919befc267dfc80037ac28b20a310eca20c - deciding round: 1 (earlier rounds are history and do not block) - round 1 r1: approve, on the current review tree - SIGNOFF REFUSED -- slices/test-slice/signoff/round1.r2.signoff has no 'tree:' line. An unparseable record is refused, never skipped. - S7 AS EXPECTED (want nonzero, got exit 1) a skipped record is a member the population lost quietly - ---- S8: a SYMLINK under slices/*/signoff/. verify must refuse --- - S6 plants a regular file. This plants a link, which is what the first draft's - `find -type f` did not match: seen by neither the file loop nor the subdirectory - check, so verify exited 0 over it. The link points at a file ALREADY tracked, so - the reviewed tree does not move and STALE cannot be what refuses -- the whitelist - has to be what refuses, or nothing does. - under the excluded directory HEAD now carries: - 120000 blob 5f9d404e87aee2fcf79e187883f038a1017c2de0 slices/test-slice/signoff/anything.sh - 100644 blob 41b69ff98018f4a3a9f3f145c0b6933729673b2e slices/test-slice/signoff/round1.r1.signoff - 100644 blob 268cfd5764d055434ac823e9942bea60d06ba96a slices/test-slice/signoff/round1.r2.signoff - SIGNOFF REFUSED -- slices/test-slice/signoff/anything.sh is a symbolic link. slices/test-slice/signoff/ is excluded from the reviewed tree, so a link out of it carries content no review sees. - S8 AS EXPECTED (want nonzero, got exit 1) an exclusion a link walks through is not an exclusion - ---- S9: round 1 objects and goes stale, round 2 approves the fixed tree. verify must exit 0 --- - PLAN.md 4's table refuses on ANY changes-required and ANY stale record, over every - record. Applied to a slice that actually runs rounds, that is a check which cannot - pass: needing a change is what rounds are for, and fixing the finding is what makes - round 1's approve stale. A check that can only fail is the mirror of one that can - only pass, and its one stable outcome is to be switched off. - records present: - slices/test-slice/signoff/round1.r1.signoff - slices/test-slice/signoff/round1.r2.signoff - slices/test-slice/signoff/round2.r1.signoff - slices/test-slice/signoff/round2.r2.signoff -== signoff verify: slices/test-slice == - review tree (HEAD's tree, slices/*/signoff/ removed): daf98e4b2a4db5f4967a381c3b33f9814e29a4be - deciding round: 2 (earlier rounds are history and do not block) - round 1 r1: changes-required (superseded by round 2) - round 1 r2: approve (superseded by round 2) - round 2 r1: approve, on the current review tree - round 2 r2: approve, on the current review tree - round 2: 2 record(s), all approve, all on the tree in front of you. - (4 record(s) in total, including superseded rounds.) - wrote slices/test-slice/signoff/verify.txt - S9 AS EXPECTED (want 0, got exit 0) the highest round decides; earlier rounds are history - -=== MUTATION: remove the slices/*/signoff/ exclusion from review_tree() === - An exclusion whose removal changes nothing was never load-bearing. S1 and S3 must break. - the one line changed: - 93c93 - < for d in slices/*/signoff; do - --- - > for d in /nonexistent-mutant-path; do # MUTANT: exclude nothing - S1 under the mutant: verify exit 1 -- BROKEN, as required - S3 under the mutant: verify exit 1 -- BROKEN, as required - -=== MUTATION 2: make every round decide, not just the highest === - This is PLAN.md 4's table as literally written. S9 must break under it, or the - departure from the plan bought nothing and should be reverted. - the one line changed: - 304c304 - < if [ "$r_round" != "$top" ]; then - --- - > if false; then # MUTANT: no round is ever superseded - S9 under mutant 2: verify exit 1 -- BROKEN, as required - -=== totals === - probes as expected: 9 - probes disagreeing: 0 - mutants surviving: 0 -PROBE_SIGNOFF_EXIT=0 diff --git a/slices/004-gate-honesty/logs/red-reuse-population.txt b/slices/004-gate-honesty/logs/red-reuse-population.txt deleted file mode 100644 index 640d8ae6..00000000 --- a/slices/004-gate-honesty/logs/red-reuse-population.txt +++ /dev/null @@ -1,19 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse FAIL (123 tracked; 42 in scope, 35 headered + 0 sidecar; excluded 79 archive + 2 licence text) - no SPDX-License-Identifier in the file or in a .license sidecar: - .gitignore - FINDINGS.md - HANDOFF.md - NOTICE - PLAN.md - mix.lock - slices/002-streamable-http/FINDINGS.md - licence files pass -GATE FAILED. -GATE_EXIT=1 diff --git a/slices/004-gate-honesty/logs/red-sidecar-untracked.txt b/slices/004-gate-honesty/logs/red-sidecar-untracked.txt deleted file mode 100644 index df715f9d..00000000 --- a/slices/004-gate-honesty/logs/red-sidecar-untracked.txt +++ /dev/null @@ -1,31 +0,0 @@ -# The sidecar half of the REUSE step is a FILESYSTEM test, not a tracked-set test. -# gate.sh: [ -f "$f.license" ] && head -5 "$f.license" | grep -q SPDX-License-Identifier -# The population is git ls-files; the COVERAGE is [ -f ]. An untracked sidecar covers a -# tracked file on this disk and does not exist in a fresh clone or in CI. - -$ printf 'key: value\n' > probe-sidecar.yaml ; git add -f probe-sidecar.yaml -$ printf 'SPDX-...\n' > probe-sidecar.yaml.license # deliberately NOT git added -$ git ls-files | grep -c '^probe-sidecar.yaml.license$' -> 0 -$ git ls-files | grep -c '^probe-sidecar.yaml$' -> 1 - -$ ./tools/gate.sh (reuse + licence files lines, and the exit code) - reuse pass (126 tracked; 45 in scope, 42 headered + 3 sidecar; excluded 79 archive + 2 licence text) - licence files pass -GATE_EXIT=0 - -== after the fix: the same plant, the same commands == -$ git ls-files | grep -c '^probe-sidecar.yaml.license$' -> 0 -$ git ls-files | grep -c '^probe-sidecar.yaml$' -> 1 -$ ./tools/gate.sh - reuse FAIL (126 tracked; 45 in scope, 42 headered + 2 sidecar; excluded 79 archive + 2 licence text) - licence files pass - no SPDX-License-Identifier in the file or in a .license sidecar: - probe-sidecar.yaml - licence files pass -GATE FAILED. -GATE_EXIT=1 --- now git add the sidecar, nothing else changes -- -$ git add -f probe-sidecar.yaml.license ; ./tools/gate.sh - reuse pass (127 tracked; 46 in scope, 43 headered + 3 sidecar; excluded 79 archive + 2 licence text) - licence files pass -GATE_EXIT=0 diff --git a/slices/004-gate-honesty/logs/red-signoff-records-unheadered.txt b/slices/004-gate-honesty/logs/red-signoff-records-unheadered.txt deleted file mode 100644 index 08e13669..00000000 --- a/slices/004-gate-honesty/logs/red-signoff-records-unheadered.txt +++ /dev/null @@ -1,14 +0,0 @@ -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse FAIL (152 tracked; 51 in scope, 47 headered + 2 sidecar; excluded 99 archive + 2 licence text) - no SPDX-License-Identifier in the file or in a .license sidecar: - slices/004-gate-honesty/signoff/round1.r1.signoff - slices/004-gate-honesty/signoff/round1.r2.signoff - licence files pass -GATE FAILED. -GATE_EXIT=1 diff --git a/slices/004-gate-honesty/logs/round1-bash32-simulation.txt b/slices/004-gate-honesty/logs/round1-bash32-simulation.txt deleted file mode 100644 index c2c7abc7..00000000 --- a/slices/004-gate-honesty/logs/round1-bash32-simulation.txt +++ /dev/null @@ -1,21 +0,0 @@ -# The bash 3.2 simulation from round 1, lane r1. The ONLY change from tools/gate.sh at -# commit 6a30cb2 is 'declare -A tracked=()' -> 'declare -a tracked=()', which is what bash -# 3.2 leaves you with because it has no -A. - -$ bash gate.bash3.sh (stdout) -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (10 tracked; 10 in scope, 9 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files pass -Gate OK. - -EXIT=0 - -$ bash gate.bash3.sh (stderr, in its entirety) -/tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/gate.bash3.sh: line 91: .formatter.exs: syntax error: operand expected (error token is ".formatter.exs") -/tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/gate.bash3.sh: line 103: LICENSE.license: syntax error: invalid arithmetic operator (error token is ".license") diff --git a/slices/004-gate-honesty/logs/round1.r1.md b/slices/004-gate-honesty/logs/round1.r1.md deleted file mode 100644 index 493766cb..00000000 --- a/slices/004-gate-honesty/logs/round1.r1.md +++ /dev/null @@ -1,88 +0,0 @@ - - -# Round 1, lane r1 — mechanism - -**Tree read:** `9a7998d1ae1f2d8ca8b4a422b0c579c24f4aae1b` (commit `6a30cb2`), pinned in -`round1.r1.tree`. -**Remit:** does each script do what its own comments claim, on the machines it will run on. -**Verdict: CHANGES-REQUIRED.** Two blocking findings. - -## Lane independence — stated first, because it is the weakest part of this record - -Both lanes of every round in this slice were run by the same agent. Subagent spawning was -withheld for this run, so "two independent lanes" here means two separate passes with different -remits and different evidence, not two parties. That is weaker than what `PLAN.md` §6 asks for -and it is recorded rather than papered over: a lane cannot be independent of itself, and the -findings below should be read as the product of one reviewer working twice. - -## R1-A (blocking) — `tools/gate.sh` reports `pass` over 10 of 145 files on bash 3.2 - -`gate.sh` used `declare -A tracked` and `tracked["$f"]=1`. Bash 3.2 — the bash every stock macOS -ships — has no `-A`, so that becomes an **indexed** array whose subscript is evaluated as -**arithmetic**. Simulated by substituting `declare -a` for `declare -A`, which is what bash 3.2 -effectively leaves you with, changing nothing else: - - $ diff tools/gate.sh $S/gate.bash3.sh - 90c90 - < declare -A tracked=() - --- - > declare -a tracked=() # SIMULATES bash 3.2, which has no -A - - $ bash $S/gate.bash3.sh - == beam_mcp gate == - ... - reuse pass (10 tracked; 10 in scope, 9 headered + 0 sidecar; excluded 0 archive + 0 licence text) - licence files pass - Gate OK. - EXIT=0 - - stderr, in its entirety, 2 lines: - line 91: .formatter.exs: syntax error: operand expected (error token is ".formatter.exs") - line 103: LICENSE.license: syntax error: invalid arithmetic operator (error token is ".license") - -The arithmetic error is fatal to its enclosing command, so each loop **aborts at its first -offending path** — the first at once, the second after ten files. The step then prints `pass` -over ten files out of 145 and the gate exits 0. - -This is the exact defect the slice exists to remove — a check reporting `pass` over a population -it never looked at — **reintroduced by the fix for it**, with two lines on stderr as the only -sign. It is the more serious of the two findings by some distance, because the old glob at least -looked at the files it claimed. - -**Required:** remove the dependency rather than document it. - -## R1-B (blocking) — a symlink walks through `signoff/`'s whitelist - -`tools/signoff.sh verify` enumerated the excluded directory with `find -mindepth 1 -type f`, -which does not match a symlink. A link was therefore seen by neither the file loop nor the -subdirectory check. Demonstrated with the link pointing at an **already tracked** file, so the -reviewed tree does not move and `STALE` cannot be what refuses: - - === HEAD now carries, under the excluded directory: === - 120000 blob 5f9d404e... slices/test/signoff/anything.sh - 100644 blob 1575c0ea... slices/test/signoff/round1.r1.signoff - 100644 blob 0ae24ecc... slices/test/signoff/round1.r2.signoff - 100644 blob a1b4159e... slices/test/signoff/verify.txt - === verify === - 2 record(s), all approve, all on the tree in front of you. - VERIFY_EXIT=0 - - === and a plain file with the same name is refused, for contrast === - SIGNOFF REFUSED -- slices/test/signoff/anything.sh is not a *.signoff record. - VERIFY_EXIT=1 - -The script's own comment says the exclusion "must not become a place to put code". A link is -how you put code there. **Required:** check the entry type before the name, and test `-L` -before `-f`, because `-f` follows the link. - -## Not blocking, recorded - -- `head -5 "$f.license"` reads the sidecar from the **worktree** while its membership is - tested in the **index**. Consistent with every other read in `gate.sh`, which runs against - the worktree throughout, so it is a limit rather than a defect. -- Paths containing newlines would break both the `while read` loops and the `missing` list. - `git ls-files` quotes such paths, and both the population and the lookup come from the same - invocation, so they cannot disagree. Recorded, not fixed. diff --git a/slices/004-gate-honesty/logs/round1.r1.tree b/slices/004-gate-honesty/logs/round1.r1.tree deleted file mode 100644 index 708fe398..00000000 --- a/slices/004-gate-honesty/logs/round1.r1.tree +++ /dev/null @@ -1 +0,0 @@ -9a7998d1ae1f2d8ca8b4a422b0c579c24f4aae1b diff --git a/slices/004-gate-honesty/logs/round1.r2.md b/slices/004-gate-honesty/logs/round1.r2.md deleted file mode 100644 index dc944559..00000000 --- a/slices/004-gate-honesty/logs/round1.r2.md +++ /dev/null @@ -1,72 +0,0 @@ - - -# Round 1, lane r2 — the record, and the tool used on itself - -**Tree read:** `9a7998d1ae1f2d8ca8b4a422b0c579c24f4aae1b` (commit `6a30cb2`), pinned in -`round1.r2.tree`. -**Remit:** does every claim in `FINDINGS.md`, in the commit messages and in the scripts' -comments match a transcript; and does the slice's own tooling survive being used on the slice. -**Verdict: CHANGES-REQUIRED.** One blocking finding, from the second half of that remit. - -## R1-C (blocking) — `signoff.sh verify` can never pass on a slice that runs rounds - -Found by trying to record this very round. `PLAN.md` §4's table says: - - - *any record's verdict is `changes-required`* → refuse - - *a record's tree hash ≠ the current review tree* → `STALE`, refuse - -over **every** record. Applied to a slice that actually runs rounds, those two rules make a -signoff unreachable: - - - round 1's `changes-required` record refuses forever — and needing a change is what rounds - are **for**; - - round 1's `approve` record goes `STALE` the instant round 2's fix commit lands, so a slice - that runs more than one round can never be signed off either. - -Measured, before the change, on this slice's own records: round 1 is `changes-required`, so -under the table as written `verify` for slice 004 could never return 0 no matter what round 3 -concluded. - -A check that cannot pass is the mirror of a check that cannot fail. `CONVENTIONS.md` says the -second "reads as coverage and is not"; the first reads as rigour and is not, and its only -stable outcome is to be switched off — which is how a control becomes a comment. - -**Required:** the highest round decides; earlier rounds are kept and printed as history. What -must not be relaxed: every record still has to **parse**, in every round, because an -unparseable record skipped is a population member lost quietly, and that is the slice's whole -subject. - -This is a departure from `PLAN.md` §4 and it is recorded as one rather than folded in silently. -The plan is left as written. - -## Record claims checked against transcripts — no discrepancy found - -Each of these was re-derived from the file named, not read back from `FINDINGS.md`: - -| claim | source | agrees | -|---|---|---| -| baseline `reuse pass (24 commentable files)`, exit 0 | `logs/gate-baseline.txt` | yes | -| red names exactly 7 files, exit 1 | `logs/gate-red-before-coverage.txt` | yes | -| `125 − 79 − 2 = 44` and `42 + 2 = 44` | `logs/gate-after-coverage.txt` | yes | -| P1–P3 `pass` under M1 | `logs/mutation-m1.txt` | yes | -| P7 count 0, P5 count 1 under M2 | `logs/mutation-m2.txt` | yes | -| P8 `pass` under M3 | `logs/mutation-m3.txt` | yes | -| 16 verdicts / 0 tree pins in 001b | `git ls-files`, re-run | yes | -| 002 round 4: 3 pins, 1 verdict | `git ls-files`, re-run | yes | - -`FINDINGS.md`'s §2a P5 disagreement is stated as a refutation of the plan rather than as a -correction to it, which is what `CONVENTIONS.md` asks for. No claim was found that a transcript -does not support. - -## Not blocking, recorded - -- `PLAN.md` §4 says the probe should build records "by calling `signoff.sh record`". S7 and S8 - edit a record and plant a link **after** `record` created it. That is the only way to reach - a malformed record at all, since `record` refuses to write one, and it is the same shape as - P8: the plant is made through the mechanism and then damaged, rather than fabricated. -- `probe_signoff.sh` uses `${id,,}`, a bash 4 construct, in its mutation loop. It is a - developer tool rather than a gate step, and R1-A's fix does not extend to it. Recorded so the - next reader is not surprised by an inconsistency. diff --git a/slices/004-gate-honesty/logs/round1.r2.tree b/slices/004-gate-honesty/logs/round1.r2.tree deleted file mode 100644 index 708fe398..00000000 --- a/slices/004-gate-honesty/logs/round1.r2.tree +++ /dev/null @@ -1 +0,0 @@ -9a7998d1ae1f2d8ca8b4a422b0c579c24f4aae1b diff --git a/slices/004-gate-honesty/logs/round2.r1.md b/slices/004-gate-honesty/logs/round2.r1.md deleted file mode 100644 index bfa72074..00000000 --- a/slices/004-gate-honesty/logs/round2.r1.md +++ /dev/null @@ -1,59 +0,0 @@ - - -# Round 2, lane r1 — mechanism - -**Tree read:** `7ae4f8330a27316e1fa7d4927d728800575ce438` (commit `08ecf7d`), pinned in -`round2.r1.tree` and in `signoff/round2.r1.signoff`. -**Remit:** what is each mechanism actually resting on. -**Verdict: CHANGES-REQUIRED.** One blocking finding. - -Round 1's fixes were re-checked first and hold: `tools/gate.sh` carries no bash-4-only -construct on a live line (P9 `pass`), and a symlink under `signoff/` is refused by name in S8. -Probes P0–P9 all read as expected at this tree (`logs/probe-gate-honesty-round2.txt`). - -## R2-A (blocking) — the signoff exclusion depended on which `grep` is first on `PATH` - -`review_tree()` excluded the signoff paths with - - git ls-tree -r -z --name-only HEAD | grep -z -E '^slices/[^/]+/signoff/' > "$list" - -`-z` does not mean one thing. Measured on the machine this was written on, where **both** greps -are installed: - - $ grep --help | grep -E '^\s+-z' - -z, --decompress <- ugrep 7.8.4, first on PATH - $ /usr/bin/grep --help | grep -- --null-data - -z, --null-data a data line ends in 0 byte, not newline <- GNU grep 3.11 - -It produced the right answer here. That is the problem: it produced the right answer for a -reason nobody had checked, and the failure mode is quiet in the expensive direction. A filter -that silently matches nothing removes the exclusion; every record then reads `STALE`; and a tool -that always refuses is a tool that gets switched off — which is R1-C's failure arriving by -another route, three commits after R1-C was fixed. - -**Required:** remove the pattern language. A shell glob does not cross `/`, so -`for d in slices/*/signoff` means exactly what it looks like, and `git rm -r --cached -- "$d"` -needs no pattern at all. - -Two alternatives were tried and rejected with a measurement rather than an opinion: - - $ git ls-tree -r -z --name-only HEAD -- ':(glob)slices/*/signoff/**' - fatal: pathspec magic not supported by this command: 'glob' - $ git ls-tree -r --name-only HEAD -- 'slices/*/signoff/*' - (no output at all) - -A git pathspec `*` matches `/`, so the plain form also reaches `slices/a/b/signoff` — wider than -the sentence describing it — and the one form that would mean what the sentence says is rejected -by the command. - -## Not blocking, recorded - -- `gate.sh` reads a sidecar's bytes from the worktree while testing membership in the index. - Unchanged from round 1 and still a limit rather than a defect: the gate runs against the - worktree throughout. -- `signoff.sh`'s `field()` takes the first match for a key. A hand-edited record with two - `tree:` lines would be read by the first. It cannot be used to make `verify` pass, because - the value read is still compared against the computed tree. diff --git a/slices/004-gate-honesty/logs/round2.r1.tree b/slices/004-gate-honesty/logs/round2.r1.tree deleted file mode 100644 index 44b61820..00000000 --- a/slices/004-gate-honesty/logs/round2.r1.tree +++ /dev/null @@ -1 +0,0 @@ -7ae4f8330a27316e1fa7d4927d728800575ce438 diff --git a/slices/004-gate-honesty/logs/round2.r2.md b/slices/004-gate-honesty/logs/round2.r2.md deleted file mode 100644 index c6a2ae4e..00000000 --- a/slices/004-gate-honesty/logs/round2.r2.md +++ /dev/null @@ -1,51 +0,0 @@ - - -# Round 2, lane r2 — the probes, and whether they can be wrong - -**Tree read:** `7ae4f8330a27316e1fa7d4927d728800575ce438` (commit `08ecf7d`), pinned in -`round2.r2.tree` and in `signoff/round2.r2.signoff`. -**Remit:** can each probe fail, and can the harness report something that did not happen. -**Verdict: CHANGES-REQUIRED.** One blocking finding. - -## R2-B (blocking) — the harness scored a mutation that had never been applied - -Round 2's own fix for R2-A moved the exclusion out of the line the mutant's `sed` targeted. The -substitution then matched nothing, `probe_signoff.sh` ran the **unmutated** script, and reported: - - probes as expected: 9 - probes disagreeing: 0 - mutants surviving: 2 - -Two survivors that do not exist. `CONVENTIONS.md` names the shape — *"a mutation reported as -applied but never applied"* — and this is the expensive direction to be wrong in: a survivor -reads as a real finding about the code, so it is acted on. A missed kill is only a gap. - -It is also the same defect as everything else in this slice, one level up: the harness reported -on a mutant it had never looked at. - -**Required:** every mutation goes through one helper that `cmp`s the mutant against the original -and refuses to score it when they are identical. And the refusal itself must be shown to fire — -an assertion that cannot fail is the thing this repository keeps finding. - -Verified by pointing the helper at a pattern that matches nothing, changing nothing else: - - MUTATION mut1 DID NOT APPLY -- the sed matched nothing. Refusing to score it. - S1: not scored, mutation did not apply - S3: not scored, mutation did not apply - -## Checked and found sound - -- P9 is an assertion over `gate.sh`'s text rather than a plant, and it can fail: put a - `declare -A` back on a live line and it goes red. Comment lines are stripped first, because - the explanation beside it legitimately contains the string. -- S8's link points at an **already tracked** file, so the reviewed tree does not move and - `STALE` cannot be what refuses. The whitelist has to be what refuses, or nothing does. That is - the right construction for the property being tested. -- S9's scenario is a single function run against both the real tool and the mutant, so the two - runs differ in exactly one thing. -- Round 1's records bind `9a7998d1…`, which is the tree at `6a30cb2` — the tree its lanes - actually read. The fixes were stashed while the records were written. Re-derived here rather - than taken from the record. diff --git a/slices/004-gate-honesty/logs/round2.r2.tree b/slices/004-gate-honesty/logs/round2.r2.tree deleted file mode 100644 index 44b61820..00000000 --- a/slices/004-gate-honesty/logs/round2.r2.tree +++ /dev/null @@ -1 +0,0 @@ -7ae4f8330a27316e1fa7d4927d728800575ce438 diff --git a/slices/004-gate-honesty/logs/round3.r1.md b/slices/004-gate-honesty/logs/round3.r1.md deleted file mode 100644 index d96ffd26..00000000 --- a/slices/004-gate-honesty/logs/round3.r1.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# Round 3, lane r1 — mechanism - -**Tree read:** `38e1d07c688d3af174a0ee1dd704b6c9367044bb`, the review tree at commit `12345d6`, -pinned in `round3.r1.tree`. -**Verdict: APPROVE.** Nothing blocking. - -## Round 1 and round 2 fixes re-checked, not taken on trust - -| finding | how it was re-checked at this tree | result | -|---|---|---| -| R1-A bash 3.2 | P9, which greps live lines of `gate.sh` for bash-4-only constructs | `pass`, and the construct is gone rather than guarded | -| R1-B symlink | S8, whose link points at an already tracked file so `STALE` cannot be what refuses | refused by name | -| R1-C round semantics | S9, plus mutation 2 restoring `PLAN.md` §4's literal table | S9 passes; the mutant breaks it | -| R2-A `grep -z` | no `grep` remains in `review_tree`; the exclusion is a shell glob and `git rm -r --cached` | S1 and S3 pass; mutation 1 breaks both | -| R2-B unapplied mutation | `mutate` `cmp`s every mutant against the original | both mutations report their diff; the refusal was shown to fire | - -## The runs, at this tree - - $ ./tools/gate.sh GATE_EXIT=0, every step line `pass` - $ ./tools/probe_gate_honesty.sh P0-P9 all as expected, EXIT=0 - $ ./tools/probe_signoff.sh 9 as expected, 0 disagreeing, 0 mutants surviving, EXIT=0 - -`logs/gate-round3.txt`, `logs/probe-gate-honesty-round3.txt`, `logs/probe-signoff.txt`. - -## Recorded, not blocking - -- `signoff.sh`'s `record` cannot bind a commit other than `HEAD`, so the review-record-fix - ordering is enforced by the operator rather than the tool. Both earlier rounds got it wrong - and both were recovered by hand. Designing the fix now, after two hand recoveries and with no - round left to review it, would be worse than recording it. In "Open". -- `echo "note: $note"` in `record` would be a `printf` in a stricter script. Bash's `echo` - does not interpret backslashes without `-e`, so nothing is wrong today. diff --git a/slices/004-gate-honesty/logs/round3.r1.tree b/slices/004-gate-honesty/logs/round3.r1.tree deleted file mode 100644 index 29227cf6..00000000 --- a/slices/004-gate-honesty/logs/round3.r1.tree +++ /dev/null @@ -1 +0,0 @@ -38e1d07c688d3af174a0ee1dd704b6c9367044bb diff --git a/slices/004-gate-honesty/logs/round3.r2.md b/slices/004-gate-honesty/logs/round3.r2.md deleted file mode 100644 index 6bca0e4b..00000000 --- a/slices/004-gate-honesty/logs/round3.r2.md +++ /dev/null @@ -1,50 +0,0 @@ - - -# Round 3, lane r2 — the record - -**Tree read:** `38e1d07c688d3af174a0ee1dd704b6c9367044bb`, the review tree at commit `12345d6`, -pinned in `round3.r2.tree`. -**Verdict: APPROVE.** Nothing blocking. - -## Every claim in FINDINGS re-derived from the file it cites - -Re-derived, not read back. Each row was checked against the named transcript or by re-running -the command. - -| claim | source | agrees | -|---|---|---| -| baseline `reuse pass (24 commentable files)`, exit 0 | `logs/gate-baseline.txt` | yes | -| the red names exactly 7 files, exit 1 | `logs/gate-red-before-coverage.txt` | yes | -| `160 − 105 − 2 = 53` and `51 + 2 = 53` at the shipped tree | `logs/gate-round3.txt` | yes | -| P1–P3 return to `pass` under M1 | `logs/mutation-m1.txt` | yes | -| P7 count 0 and P5 count 1 under M2 | `logs/mutation-m2.txt` | yes | -| P8 `pass` under M3 | `logs/mutation-m3.txt` | yes | -| the bash 3.2 run says `pass (10 tracked…)` and `EXIT=0` | `logs/round1-bash32-simulation.txt` | yes | -| the unheadered signoff records turned `reuse` red | `logs/red-signoff-records-unheadered.txt` | yes | -| 16 verdicts / 0 tree pins in 001b; 3 pins / 1 verdict in 002 round 4 | `git ls-files`, re-run | yes | -| round 1 records bind `9a7998d1…`, round 2 `7ae4f833…` | the record files | yes | - -## The disagreements are recorded as disagreements - -`PLAN.md` §2a's P5 row and §4's `verify` table are both contradicted by measurement. Both are -left standing in the plan with the refutation recorded beside them, which is what -`CONVENTIONS.md` asks for — corrections are appended, never rewritten. Nothing in `PLAN.md` was -edited to match a result. - -## The one thing this record cannot claim - -Both lanes are the same agent. It is stated at the top of "Open" rather than buried, and it is -the reason the round table should be read as one reviewer working twice rather than as -independent agreement. - -## Recorded, not blocking - -- `logs/round3.*.tree` names `38e1d07c…` while `signoff/round3.*.signoff` binds the shipped - tree, and the two differ by exactly the commit that adds this record. A tree pin cannot live - inside the tree it pins. That is the structural argument for the signoff directory's - exclusion, and it is in "Open" as a property rather than a defect. -- `PLAN.md` §3's four `mix docs` honesty questions were not investigated. The plan marks them - time-boxed and optional; the rounds went elsewhere. No claim is made about that step. diff --git a/slices/004-gate-honesty/logs/round3.r2.tree b/slices/004-gate-honesty/logs/round3.r2.tree deleted file mode 100644 index 29227cf6..00000000 --- a/slices/004-gate-honesty/logs/round3.r2.tree +++ /dev/null @@ -1 +0,0 @@ -38e1d07c688d3af174a0ee1dd704b6c9367044bb diff --git a/slices/004-gate-honesty/logs/sweep-after.txt b/slices/004-gate-honesty/logs/sweep-after.txt deleted file mode 100644 index 68c0446a..00000000 --- a/slices/004-gate-honesty/logs/sweep-after.txt +++ /dev/null @@ -1,416 +0,0 @@ -=== POPULATION, derived from the tracked set rather than listed === - slices/001b-ping-guard/logs/archive-sweep.txt - slices/001b-ping-guard/logs/full-suite.txt - slices/001b-ping-guard/logs/gate.txt - slices/001b-ping-guard/logs/green-negotiation.txt - slices/001b-ping-guard/logs/mutation-a.txt - slices/001b-ping-guard/logs/mutation-b.txt - slices/001b-ping-guard/logs/mutation-readme-a.txt - slices/001b-ping-guard/logs/mutation-readme-b.txt - slices/001b-ping-guard/logs/probe-after.txt - slices/001b-ping-guard/logs/red.txt - slices/001b-ping-guard/logs/round1.r1.md - slices/001b-ping-guard/logs/round1.r2.md - slices/001b-ping-guard/logs/round2.r1.md - slices/001b-ping-guard/logs/round2.r2.md - slices/001b-ping-guard/logs/round3.r1.md - slices/001b-ping-guard/logs/round3.r2.md - slices/001b-ping-guard/logs/round4.r1.md - slices/001b-ping-guard/logs/round4.r2.md - slices/001b-ping-guard/logs/round5.r1.md - slices/001b-ping-guard/logs/round5.r2.md - slices/001b-ping-guard/logs/round6.r1.md - slices/001b-ping-guard/logs/round6.r2.md - slices/001b-ping-guard/logs/round7.r1.md - slices/001b-ping-guard/logs/round7.r2.md - slices/001b-ping-guard/logs/round8.r1.md - slices/001b-ping-guard/logs/round8.r2.md - slices/001b-ping-guard/logs/spec-basic-versioning.md - slices/001b-ping-guard/logs/spec-changelog.md - slices/001b-ping-guard/logs/spec-legacy-basic.md - -Two kinds of file live here, and only one kind can be diffed against a command: - CAPTURES - a command wrote them; re-run the command and compare bytes. - Includes the spec-*.md files: 'curl -o' IS the command and the - upstream page IS the source, so they are checkable, not prose. - AUTHORED - the round*.md lane reports. Each was written by the reviewer that - is its source. Nothing to re-run; they must simply never be - labelled the output of a command. - -=== warming the build so comparisons do not depend on _build state === - $ mix compile --force ; mix test --exclude all (output discarded; only the - build state matters here, and a cold build emits compile lines no archive contains) - -=== CAPTURES: test and gate logs === --- full-suite.txt: diff vs a fresh 'mix test', seed+timing normalised on BOTH sides -- - comparison: 205 differing line(s), diff exit=1 - 3,204c3 - < warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - < - < │ - < 12 │ use Plug.Test - < │ ~~~~~~~~~~~~~ - < │ - < └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - < - < ....................................................... - < 18:36:45.317 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - < ....... - < 18:36:45.379 [info] beam_mcp: refused by host authorize/1: :nope - < ......... - < 18:36:45.482 [error] ** (throw) :thrown_secret - < test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - < test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < - < 18:36:45.482 [error] ** (exit) :kaboom_secret - < test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - < test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ....... - < 18:36:45.490 [error] ** (throw) :catalog_unavailable - < test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - < (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ... - < 18:36:45.592 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - < test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < - < 18:36:45.592 [error] ** (throw) :authorize_threw - < test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < - < 18:36:45.592 [error] ** (exit) :authorize_exited - < test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < . - < 18:36:45.593 [error] ** (RuntimeError) ordinary fault - < test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ..... - < 18:36:45.650 [error] ** (Plug.BadRequestError) could not process the request due to client error - < test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - < (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ...... - < 18:36:45.704 [error] ** (Plug.BadRequestError) could not process the request due to client error - < test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < .... - < 18:36:45.704 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - < .. - < 18:36:45.711 [error] ** (KeyError) key :input_schema not found in: - < - < %{name: :echo} - < - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:583: BeamMCP.Transport.HTTP.mirrored_params/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ... - < 18:36:45.711 [error] ** (RuntimeError) ordinary fault - < test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ....... - < 18:36:45.712 [error] ** (RuntimeError) host dispatch exploded - < test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ...... - < 18:36:45.712 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - < ...... - < 18:36:45.713 [error] ** (RuntimeError) SECRET internal detail - < test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ... - < 18:36:45.713 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false - < .............. - --- - > ............................................... - 206c5 - < 138 tests, 0 failures - --- - > 47 tests, 0 failures - => full-suite.txt DIFFERS (the diff above is the difference) - --- green-negotiation.txt: same command, same normalisation -- - comparison: 0 differing line(s), diff exit=0 - => green-negotiation.txt RAW (0 differing lines above) - --- gate.txt: no normalisation, the gate emits nothing variable -- - comparison: 4 differing line(s), diff exit=1 - 6,8c6 - < optional deps pass - < docs pass - < reuse pass (24 commentable files) - --- - > reuse pass (20 commentable files) - => gate.txt DIFFERS (the diff above is the difference) - -=== CAPTURES: the probe === --- probe-after.txt vs a WARM fresh run of the tracked probe, no normalisation -- - comparison: 6 differing line(s), diff exit=1 - 1c1 - < beam_mcp version: 0.3.0 - --- - > beam_mcp version: 0.2.0 - 12c12 - < -> {"id":2,"jsonrpc":"2.0","result":{"cacheScope":"private","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}],"ttlMs":0}} - --- - > -> {"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}]}} - 14c14 - < -> {"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"beam_mcp","version":"0.3.0"}},"cacheScope":"private","resultType":"complete","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}],"ttlMs":0}} - --- - > -> {"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"beam_mcp","version":"0.2.0"}},"resultType":"complete","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}]}} - => probe-after.txt DIFFERS (the diff above is the difference) - NOTE, and the direction matters: against a COLD _build the same command emits extra - dependency-compile lines, so the archive would have FEWER lines than that run. - Fewer-lines-than-the-run is the SIGNATURE OF FILTERING -- it is exactly what was - found in instances #2 and #3 -- so it is never on its own an acquittal. What - acquits this file is the byte-identical match against a warm run above. - -=== CAPTURES: red.txt, the red half of red-before-green === - RESTORED in round 6. The round-4 sweep classified this file; the round-5 rewrite - enumerated it and classified it nowhere, so a reader scanning for DIFFERS got a clean - bill over a population the instrument had not finished. An unclassified file is not a - RAW file. That is CONVENTIONS.md's 'proves nothing, and proves it quietly' shape, and - it is the coverage regression r2 blocked round 5 on -- inside the round that promised - the population. - Not re-runnable here: it is the failing state BEFORE the fix, and lib/ is now fixed. - Reproducing it needs lib/beam_mcp/server.ex reverted to base/main, which this script - must not do to the working tree. Checked instead for the marks a filtered capture - cannot have: - seed banner : 1 - stacktrace: : 2 - code: : 2 - Finished in : 1 - tests, line : 12 tests, 2 failures - => red.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the two mutation logs === --- mutation-a.txt -- - not re-run here: reproducing it needs a mutated copy of lib/, which this script - must not create in the working tree. Checked instead for the marks a filtered - capture cannot have -- the ExUnit banner and a complete failure body: - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 15 tests, 1 failure - => mutation-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) --- mutation-b.txt -- - not re-run here: reproducing it needs a mutated copy of lib/, which this script - must not create in the working tree. Checked instead for the marks a filtered - capture cannot have -- the ExUnit banner and a complete failure body: - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 15 tests, 1 failure - => mutation-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the README-claim mutation logs === - Same treatment as the mutation logs above and for the same reason: reproducing them - needs a mutated README or lib/, which this script must not create in the working tree. --- mutation-readme-a.txt -- - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 8 tests, 1 failure - => mutation-readme-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) --- mutation-readme-b.txt -- - seed banner : 1 - stacktrace: : 2 - code: : 2 - Finished in : 1 - tests, line : 8 tests, 2 failures - => mutation-readme-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the three specification pages, re-fetched and diffed against upstream === -These are the only files whose source lives OUTSIDE the tree, so they are the only -ones a diff can check against an independent authority. Grouping them with prose -(the first version of this script did) is what would excuse never checking them. - comparison: 0 differing line(s), diff exit=0 - => spec-basic-versioning.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning.md) - comparison: 0 differing line(s), diff exit=0 - => spec-changelog.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/changelog.md) - comparison: 0 differing line(s), diff exit=0 - => spec-legacy-basic.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2025-11-25/basic.md) - -=== AUTHORED: the lane reports === - round1.r1.md written by its own reviewer lane; not a command capture - round1.r2.md written by its own reviewer lane; not a command capture - round2.r1.md written by its own reviewer lane; not a command capture - round2.r2.md written by its own reviewer lane; not a command capture - round3.r1.md written by its own reviewer lane; not a command capture - round3.r2.md written by its own reviewer lane; not a command capture - round4.r1.md written by its own reviewer lane; not a command capture - round4.r2.md written by its own reviewer lane; not a command capture - round5.r1.md written by its own reviewer lane; not a command capture - round5.r2.md written by its own reviewer lane; not a command capture - round6.r1.md written by its own reviewer lane; not a command capture - round6.r2.md written by its own reviewer lane; not a command capture - round7.r1.md written by its own reviewer lane; not a command capture - round7.r2.md written by its own reviewer lane; not a command capture - round8.r1.md written by its own reviewer lane; not a command capture - round8.r2.md written by its own reviewer lane; not a command capture - -=== archive-sweep.txt itself === - A file cannot diff itself while being written, so this entry NAMES ITS CHECK rather - than asserting a conclusion -- the thing this script's own header forbids: - script sha256 : f6429e6d4618ee0dddd9a73487e23534635dc9a4c2469a74301898cf9c3f2428 - reproduce : ./tools/archive_sweep.sh > slices/001b-ping-guard/logs/archive-sweep.txt 2>&1 - then diff that against the tracked file. A reader who doubts any verdict above - re-runs that one line; the script is tracked, so the bytes that produced this - output are in the tree next to it. - => archive-sweep.txt RAW (self: named check above, not an assertion) - -=== CLOSING TALLY -- names, because counts were the loophole === - Round 5 enumerated red.txt and classified it nowhere: 19 listed, 18 classified, and - the output still read as a clean sweep because nothing counted. A file could drop out - QUIETLY -- CONVENTIONS.md's own worst shape, and this script's header says a list is - not a population. - - Counting closed one shape and left another. 'Every enumerated file is classified' is a - claim about NAMES, and two integers cannot carry it: rename one file inside the - population and the loop above still hands a verdict to the name that left, so both - integers are unchanged and the tally reads BALANCES over a file nothing looked at. - Measured, not imagined -- ./tools/probe_archive_tally.sh renames mutation-a.txt to - mutation-c.txt and the counting version printed 'enumerated : 29 / classified : 29 / - TALLY BALANCES' while giving mutation-a.txt a verdict though the file did not exist. - - So the comparison is now between two SETS OF PATHS, printed in BOTH directions. - The second direction is the one a counter can never see. - enumerated : 29 - classified : 29 (13 verdicts + 16 authored lane reports) - => TALLY BALANCES: the classified set and the enumerated set are the same names. - -=== EXIT STATUS === - SWEEP FAILED: at least one DIFFERS, UNCHECKED, or tally mismatch above. - A DIFFERS is not by itself evidence of fabrication. This script re-runs each command - against the CURRENT tree, so an archive captured at an earlier tree differs because - the tree moved. What the exit status now says is 'a human must read this', which is - what it always should have said and did not. diff --git a/slices/004-gate-honesty/logs/sweep-baseline.txt b/slices/004-gate-honesty/logs/sweep-baseline.txt deleted file mode 100644 index e14e1573..00000000 --- a/slices/004-gate-honesty/logs/sweep-baseline.txt +++ /dev/null @@ -1,399 +0,0 @@ -=== POPULATION, derived from the tracked set rather than listed === - slices/001b-ping-guard/logs/archive-sweep.txt - slices/001b-ping-guard/logs/full-suite.txt - slices/001b-ping-guard/logs/gate.txt - slices/001b-ping-guard/logs/green-negotiation.txt - slices/001b-ping-guard/logs/mutation-a.txt - slices/001b-ping-guard/logs/mutation-b.txt - slices/001b-ping-guard/logs/mutation-readme-a.txt - slices/001b-ping-guard/logs/mutation-readme-b.txt - slices/001b-ping-guard/logs/probe-after.txt - slices/001b-ping-guard/logs/red.txt - slices/001b-ping-guard/logs/round1.r1.md - slices/001b-ping-guard/logs/round1.r2.md - slices/001b-ping-guard/logs/round2.r1.md - slices/001b-ping-guard/logs/round2.r2.md - slices/001b-ping-guard/logs/round3.r1.md - slices/001b-ping-guard/logs/round3.r2.md - slices/001b-ping-guard/logs/round4.r1.md - slices/001b-ping-guard/logs/round4.r2.md - slices/001b-ping-guard/logs/round5.r1.md - slices/001b-ping-guard/logs/round5.r2.md - slices/001b-ping-guard/logs/round6.r1.md - slices/001b-ping-guard/logs/round6.r2.md - slices/001b-ping-guard/logs/round7.r1.md - slices/001b-ping-guard/logs/round7.r2.md - slices/001b-ping-guard/logs/round8.r1.md - slices/001b-ping-guard/logs/round8.r2.md - slices/001b-ping-guard/logs/spec-basic-versioning.md - slices/001b-ping-guard/logs/spec-changelog.md - slices/001b-ping-guard/logs/spec-legacy-basic.md - -Two kinds of file live here, and only one kind can be diffed against a command: - CAPTURES - a command wrote them; re-run the command and compare bytes. - Includes the spec-*.md files: 'curl -o' IS the command and the - upstream page IS the source, so they are checkable, not prose. - AUTHORED - the round*.md lane reports. Each was written by the reviewer that - is its source. Nothing to re-run; they must simply never be - labelled the output of a command. - -=== warming the build so comparisons do not depend on _build state === - $ mix compile --force ; mix test --exclude all (output discarded; only the - build state matters here, and a cold build emits compile lines no archive contains) - -=== CAPTURES: test and gate logs === --- full-suite.txt: diff vs a fresh 'mix test', seed+timing normalised on BOTH sides -- - comparison: 205 differing line(s), diff exit=1 - 3,204c3 - < warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - < - < │ - < 12 │ use Plug.Test - < │ ~~~~~~~~~~~~~ - < │ - < └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - < - < ...................................................... - < 18:28:52.091 [error] ** (RuntimeError) SECRET internal detail - < test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < . - < 18:28:52.092 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false - < . - < 18:28:52.144 [info] beam_mcp: refused by host authorize/1: :nope - < .... - < 18:28:52.195 [error] ** (RuntimeError) host dispatch exploded - < test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ....... - < 18:28:52.249 [error] ** (RuntimeError) ordinary fault - < test/beam_mcp/transport/http_test.exs:1233: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1234: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < .... - < 18:28:52.250 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - < ... - < 18:28:52.251 [error] ** (RuntimeError) ordinary fault - < test/beam_mcp/transport/http_test.exs:1244: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1247: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ....... - < 18:28:52.312 [error] ** (KeyError) key :input_schema not found in: - < - < %{name: :echo} - < - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:583: BeamMCP.Transport.HTTP.mirrored_params/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1177: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised outside host_call/1, keeps the envelope"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ...... - < 18:28:52.313 [error] ** (Plug.BadRequestError) could not process the request due to client error - < test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ......... - < 18:28:52.367 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - < ..... - < 18:28:52.418 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - < ............. - < 18:28:52.477 [error] ** (throw) :catalog_unavailable - < test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - < (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < . - < 18:28:52.478 [error] ** (throw) :thrown_secret - < test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - < test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < - < 18:28:52.478 [error] ** (exit) :kaboom_secret - < test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:811: BeamMCP.Transport.HTTP.do_dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:729: BeamMCP.Transport.HTTP.dispatch/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - < test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ...... - < 18:28:52.481 [error] ** (Plug.BadRequestError) could not process the request due to client error - < test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - < (beam_mcp 0.3.0) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:582: BeamMCP.Transport.HTTP.mirrored_params/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:535: BeamMCP.Transport.HTTP.check_param_headers/4 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:496: BeamMCP.Transport.HTTP.check_headers/3 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:224: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ........ - < 18:28:52.482 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - < test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < - < 18:28:52.482 [error] ** (throw) :authorize_threw - < test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < - < 18:28:52.482 [error] ** (exit) :authorize_exited - < test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:784: BeamMCP.Transport.HTTP.host_call/1 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:303: BeamMCP.Transport.HTTP.authorize/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - < (beam_mcp 0.3.0) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - < test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - < test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - < (stdlib 7.1) timer.erl:599: :timer.tc/2 - < (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - < - < ......... - --- - > ............................................... - 206c5 - < 138 tests, 0 failures - --- - > 47 tests, 0 failures - => full-suite.txt DIFFERS (the diff above is the difference) - --- green-negotiation.txt: same command, same normalisation -- - comparison: 0 differing line(s), diff exit=0 - => green-negotiation.txt RAW (0 differing lines above) - --- gate.txt: no normalisation, the gate emits nothing variable -- - comparison: 4 differing line(s), diff exit=1 - 6,8c6 - < optional deps pass - < docs pass - < reuse pass (24 commentable files) - --- - > reuse pass (20 commentable files) - => gate.txt DIFFERS (the diff above is the difference) - -=== CAPTURES: the probe === --- probe-after.txt vs a WARM fresh run of the tracked probe, no normalisation -- - comparison: 6 differing line(s), diff exit=1 - 1c1 - < beam_mcp version: 0.3.0 - --- - > beam_mcp version: 0.2.0 - 12c12 - < -> {"id":2,"jsonrpc":"2.0","result":{"cacheScope":"private","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}],"ttlMs":0}} - --- - > -> {"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}]}} - 14c14 - < -> {"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"beam_mcp","version":"0.3.0"}},"cacheScope":"private","resultType":"complete","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}],"ttlMs":0}} - --- - > -> {"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"beam_mcp","version":"0.2.0"}},"resultType":"complete","tools":[{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Echo.","inputSchema":{"additionalProperties":true,"properties":{},"type":"object"},"name":"echo"}]}} - => probe-after.txt DIFFERS (the diff above is the difference) - NOTE, and the direction matters: against a COLD _build the same command emits extra - dependency-compile lines, so the archive would have FEWER lines than that run. - Fewer-lines-than-the-run is the SIGNATURE OF FILTERING -- it is exactly what was - found in instances #2 and #3 -- so it is never on its own an acquittal. What - acquits this file is the byte-identical match against a warm run above. - -=== CAPTURES: red.txt, the red half of red-before-green === - RESTORED in round 6. The round-4 sweep classified this file; the round-5 rewrite - enumerated it and classified it nowhere, so a reader scanning for DIFFERS got a clean - bill over a population the instrument had not finished. An unclassified file is not a - RAW file. That is CONVENTIONS.md's 'proves nothing, and proves it quietly' shape, and - it is the coverage regression r2 blocked round 5 on -- inside the round that promised - the population. - Not re-runnable here: it is the failing state BEFORE the fix, and lib/ is now fixed. - Reproducing it needs lib/beam_mcp/server.ex reverted to base/main, which this script - must not do to the working tree. Checked instead for the marks a filtered capture - cannot have: - seed banner : 1 - stacktrace: : 2 - code: : 2 - Finished in : 1 - tests, line : 12 tests, 2 failures - => red.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the two mutation logs === --- mutation-a.txt -- - not re-run here: reproducing it needs a mutated copy of lib/, which this script - must not create in the working tree. Checked instead for the marks a filtered - capture cannot have -- the ExUnit banner and a complete failure body: - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 15 tests, 1 failure - => mutation-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) --- mutation-b.txt -- - not re-run here: reproducing it needs a mutated copy of lib/, which this script - must not create in the working tree. Checked instead for the marks a filtered - capture cannot have -- the ExUnit banner and a complete failure body: - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 15 tests, 1 failure - => mutation-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the README-claim mutation logs === - Same treatment as the mutation logs above and for the same reason: reproducing them - needs a mutated README or lib/, which this script must not create in the working tree. --- mutation-readme-a.txt -- - seed banner : 1 - stacktrace: : 1 - code: : 1 - Finished in : 1 - tests, line : 8 tests, 1 failure - => mutation-readme-a.txt RAW (banner + code: + stacktrace: + Finished in, all present) --- mutation-readme-b.txt -- - seed banner : 1 - stacktrace: : 2 - code: : 2 - Finished in : 1 - tests, line : 8 tests, 2 failures - => mutation-readme-b.txt RAW (banner + code: + stacktrace: + Finished in, all present) - -=== CAPTURES: the three specification pages, re-fetched and diffed against upstream === -These are the only files whose source lives OUTSIDE the tree, so they are the only -ones a diff can check against an independent authority. Grouping them with prose -(the first version of this script did) is what would excuse never checking them. - comparison: 0 differing line(s), diff exit=0 - => spec-basic-versioning.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning.md) - comparison: 0 differing line(s), diff exit=0 - => spec-changelog.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2026-07-28/changelog.md) - comparison: 0 differing line(s), diff exit=0 - => spec-legacy-basic.md RAW (re-fetched from https://modelcontextprotocol.io/specification/2025-11-25/basic.md) - -=== AUTHORED: the lane reports === - round1.r1.md written by its own reviewer lane; not a command capture - round1.r2.md written by its own reviewer lane; not a command capture - round2.r1.md written by its own reviewer lane; not a command capture - round2.r2.md written by its own reviewer lane; not a command capture - round3.r1.md written by its own reviewer lane; not a command capture - round3.r2.md written by its own reviewer lane; not a command capture - round4.r1.md written by its own reviewer lane; not a command capture - round4.r2.md written by its own reviewer lane; not a command capture - round5.r1.md written by its own reviewer lane; not a command capture - round5.r2.md written by its own reviewer lane; not a command capture - round6.r1.md written by its own reviewer lane; not a command capture - round6.r2.md written by its own reviewer lane; not a command capture - round7.r1.md written by its own reviewer lane; not a command capture - round7.r2.md written by its own reviewer lane; not a command capture - round8.r1.md written by its own reviewer lane; not a command capture - round8.r2.md written by its own reviewer lane; not a command capture - -=== archive-sweep.txt itself === - A file cannot diff itself while being written, so this entry NAMES ITS CHECK rather - than asserting a conclusion -- the thing this script's own header forbids: - script sha256 : c2686bb80cf66045f62dc647b6826e5fef58cd51c4611202c641a21c492bdc63 - reproduce : ./tools/archive_sweep.sh > slices/001b-ping-guard/logs/archive-sweep.txt 2>&1 - then diff that against the tracked file. A reader who doubts any verdict above - re-runs that one line; the script is tracked, so the bytes that produced this - output are in the tree next to it. - => archive-sweep.txt RAW (self: named check above, not an assertion) - -=== CLOSING TALLY -- the structural fix, not an instance fix === - Round 5 enumerated red.txt and classified it nowhere: 19 listed, 18 classified, and - the output still read as a clean sweep because nothing counted. A file could drop out - QUIETLY -- CONVENTIONS.md's own worst shape, and this script's header says a list is - not a population. So the population and the classifications are now counted and - compared, and disagreement is a FAILURE of this script rather than a silent gap. - enumerated : 29 - classified : 29 (13 verdicts + 16 authored lane reports) - => TALLY BALANCES: every enumerated file is classified. diff --git a/slices/004-gate-honesty/signoff/round1.r1.signoff b/slices/004-gate-honesty/signoff/round1.r1.signoff deleted file mode 100644 index e55d48f7..00000000 --- a/slices/004-gate-honesty/signoff/round1.r1.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/004-gate-honesty -round: 1 -lane: r1 -verdict: changes-required -tree: 9a7998d1ae1f2d8ca8b4a422b0c579c24f4aae1b -commit: 6a30cb2d0459a62f4704ce7a0ee8949f43f19ccf -recorded: 2026-09-07T23:34:10Z -note: R1-A: gate.sh reports pass over 10 of 145 files on bash 3.2; R1-B: a symlink walks through signoff/'s whitelist diff --git a/slices/004-gate-honesty/signoff/round1.r2.signoff b/slices/004-gate-honesty/signoff/round1.r2.signoff deleted file mode 100644 index d40b16ff..00000000 --- a/slices/004-gate-honesty/signoff/round1.r2.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/004-gate-honesty -round: 1 -lane: r2 -verdict: changes-required -tree: 9a7998d1ae1f2d8ca8b4a422b0c579c24f4aae1b -commit: 6a30cb2d0459a62f4704ce7a0ee8949f43f19ccf -recorded: 2026-09-07T23:34:10Z -note: R1-C: verify can never pass on a slice that runs rounds diff --git a/slices/004-gate-honesty/signoff/round2.r1.signoff b/slices/004-gate-honesty/signoff/round2.r1.signoff deleted file mode 100644 index 145b8de9..00000000 --- a/slices/004-gate-honesty/signoff/round2.r1.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/004-gate-honesty -round: 2 -lane: r1 -verdict: changes-required -tree: 7ae4f8330a27316e1fa7d4927d728800575ce438 -commit: 08ecf7d53e8b16d825704fd7ff440418e73901c9 -recorded: 2026-09-07T23:40:28Z -note: R2-A: the signoff exclusion depended on which grep is first on PATH diff --git a/slices/004-gate-honesty/signoff/round2.r2.signoff b/slices/004-gate-honesty/signoff/round2.r2.signoff deleted file mode 100644 index af209d6c..00000000 --- a/slices/004-gate-honesty/signoff/round2.r2.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/004-gate-honesty -round: 2 -lane: r2 -verdict: changes-required -tree: 7ae4f8330a27316e1fa7d4927d728800575ce438 -commit: 08ecf7d53e8b16d825704fd7ff440418e73901c9 -recorded: 2026-09-07T23:40:28Z -note: R2-B: the probe scored a mutation that had never been applied diff --git a/slices/004-gate-honesty/signoff/round3.r1.signoff b/slices/004-gate-honesty/signoff/round3.r1.signoff deleted file mode 100644 index 0aa73a08..00000000 --- a/slices/004-gate-honesty/signoff/round3.r1.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/004-gate-honesty -round: 3 -lane: r1 -verdict: approve -tree: 63e9f76e9a02da45ce85f61e46e052381d1821a8 -commit: 9c2c926cc717a709925bb89d8e039f2420bb5514 -recorded: 2026-09-07T23:44:41Z -note: mechanism: round 1 and 2 fixes re-checked by their anchors at this tree diff --git a/slices/004-gate-honesty/signoff/round3.r2.signoff b/slices/004-gate-honesty/signoff/round3.r2.signoff deleted file mode 100644 index ad0f04b3..00000000 --- a/slices/004-gate-honesty/signoff/round3.r2.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/004-gate-honesty -round: 3 -lane: r2 -verdict: approve -tree: 63e9f76e9a02da45ce85f61e46e052381d1821a8 -commit: 9c2c926cc717a709925bb89d8e039f2420bb5514 -recorded: 2026-09-07T23:44:41Z -note: record: every FINDINGS claim re-derived from its transcript diff --git a/slices/006-harness-honesty/FINDINGS.md b/slices/006-harness-honesty/FINDINGS.md deleted file mode 100644 index f9abbd1b..00000000 --- a/slices/006-harness-honesty/FINDINGS.md +++ /dev/null @@ -1,680 +0,0 @@ - - -# Slice 006 — FINDINGS - -**Issue:** SCR-289. Every count below is quoted from a command's output; the command and its -archive are named beside it. - -## The closing rule, written before round 1 opens - -Two lanes, three rounds maximum. - -- **Lane `m` — the mechanism.** Is the diagnosis right, is the replacement a replacement rather - than a retune, and can the new read logic still fail when the behaviour it pins is removed? -- **Lane `h` — the record and the instrument.** Do the archives say what was measured, is - `tools/mutate.sh` re-runnable by someone who has only this repository, and does anything here - claim more than it measured? - -A round closes when both lanes have recorded a verdict with `tools/signoff.sh record`, and both -`logs/round..md` and `logs/round..tree` exist for that round. The slice closes -when the highest round is `approve` from both lanes on the current review tree — that is, -`tools/signoff.sh verify slices/006-harness-honesty` exits 0. If round 3 closes with any -`changes-required` outstanding, the slice **stops and reports** rather than opening a round 4. - -A lane that could not spawn its own subagents says so in its own verdict rather than letting -"two lanes" imply an independence it does not have. - -## The red, and it is a rate - -### In CI, on commits containing no code - -Two push-event runs failed on the same assertion, on two different commits, neither of which -contains a line of Elixir: - - run 34174975336 PR #15 seed 70815 160 tests, 1 failure - run 34175931068 PR #17 seed 11394 160 tests, 1 failure - 1) test a live listener: what a refusal does to the connection - a refusal over the adapter's drain cap now announces the close it always did - code: assert String.contains?(bytes, "HTTP/1.1 403") - -Both commits' `pull_request` runs of the **same commit** passed. The two events run the identical -job (`.github/workflows/gate.yml` has one `gate` job and no event conditionals), so one commit -produced two answers. Two failures in the fifteen most recent push runs; `main` has three green -runs in that window and is **not immune, merely unhit**. Both runs are left red as standing -evidence and were not re-run. - -### On the development machine, before any change - - mix test --max-cases 8, 100 consecutive runs, 32 idle cores 2 of 100 exited non-zero - mix test --max-cases 64, 100 consecutive runs, 32 idle cores 1 of 100 exited non-zero - -`logs/red-rate-mc8-idle.txt` and `logs/red-rate-mc64-idle.txt`. All three failures are that same -test, and each prints what the local rate makes visible and the CI transcript did not — **the -argument**: - - code: assert String.contains?(bytes, "HTTP/1.1 403") - arguments: - # 1 - "" - -`bytes` is **empty**. Not short, not partial: empty. The whole suite finished in 3.5 s, so the -10_000 ms first-byte window was never reached either. - -**The local rate is 2% and CI's is 2 in 15. The disagreement is reported rather than smoothed:** -this machine has 32 cores and CI has far fewer, and everything measured below says the defect is -governed by whether the client process is scheduled in time. A rate that rises when CPU is scarce -is consistent with that; it is not evidence of two different defects, and it is not evidence of -one either. What closes the question is the CI run at the end of this slice, not this paragraph. - -## The PLAN's hypothesis was wrong, and here is what is actually wrong - -The PLAN said `drain/2` terminates on wall-clock silence, so under load it returns a **partial** -buffer and reports `:open`. **Refuted.** The failing read returns an **empty** buffer and reports -`:closed`, and it never takes a timeout branch at all — which is also why slice 003's repair, -splitting one 700 ms window into `10_000 + 700`, reduced the rate and left the mechanism. You -cannot retune your way out of a branch you are not in. - -### Where the bytes go - -`logs/probe-drain-mechanism.txt` — the 9 MB refusal, 40 runs per variant, reporting -`{bytes received, recv reason, send result, saw the 403?}`: - - A send everything, then read (what the file did) 29x {297, :closed, :ok, true} - 11x {0, :closed, :ok, false} - B A, plus show_econnreset: true 21x {297, :closed, ...} - 11x {297, :econnreset, ...} - 8x {0, :econnreset, :ok, false} - C passive recv concurrent with the write 40x {297, :closed, :ok, true} - D C, plus show_econnreset: true 25x {297, :econnreset, ...} - 15x {297, :closed, ...} - -The server refuses on the headers, writes a 297-byte 403, and closes with ~9 MB still unread, so -Linux aborts the connection with an RST rather than a FIN. **The response is lost, not late.** -`show_econnreset: true` renames the error and does not save the data. - -### Which side loses it - -`logs/probe-loss-site.txt` puts a message-sending `authorize` callback in the plug so that "the -server never answered" is distinguishable from "the answer never arrived", and runs 60 exchanges -under 32 busy loops: - - 57x {297, :econnreset, ..., authorize ran: true} - 3x {0, :econnreset, ..., authorize ran: true} - -**The server decided and wrote its refusal 60 times out of 60.** Three of those refusals never -reached the client. `logs/probe-write-shape.txt` rules the write shape out as the governor: on the -same loaded machine, 120 runs in one 9 MB send lost 0 and 120 runs in 64 KB chunks lost 5. - -So there are two distinct faults wearing one symptom, and they need different fixes: - -1. **A verdict reported over a buffer that was never read.** `drain/2` answered `{acc, :closed}` - and `{acc, :open}` over whatever `acc` held, including nothing. This is the whole defect and it - is entirely on this side of the wire. -2. **A response segment destroyed in transit** by the RST the server's own close emits. No read - logic can recover it. Roughly 5% of exchanges at worst under deliberate CPU starvation. - -## The fix - -`test/beam_mcp/transport/http_bandit_test.exs` only. `lib/` is untouched — verified by -`git status` on every archived run, and by `tools/mutate.sh`, which restores its target from an -EXIT trap. - -1. **The read terminates on the protocol.** `collect/3` reads until `expect` **complete** HTTP - responses have been parsed — status line, headers, and the `content-length` bytes that follow. - Every response this adapter sends declares a length, so completeness is decidable from the - bytes. A timeout is no longer a verdict: it raises. -2. **`active: true`, and the write in its own process.** A passive socket keeps received bytes - inside the port, and a failing `gen_tcp:send` destroys the port — so a reader not yet - *scheduled* to call `recv` loses them, which is exactly what CPU starvation produces. Measured: - the passive-but-concurrent shape still lost 6 of 40 loaded suites - (`logs/probe-rate-mc8-load32-passive.txt`). In active mode the driver posts `{:tcp, ...}` into - this process's mailbox without this process running, and a message in a mailbox cannot be taken - back by a port dying. -3. **`:open` versus `:closed` survives, and is asked in the right order.** `settle/2` is only - entered once the responses are already complete. TCP delivers a FIN in order behind the bytes - that preceded it, so this window is not racing the response; it is racing only the server's own - close syscall. `:open` is the absence of an event and cannot be decided any other way over a - socket — that is stated in the file rather than hidden, and what it can no longer do is report - a verdict over an empty or short buffer. -4. **An exchange that produced no measurement is repeated, not reported.** The predicate is - protocol-determined — *the connection ended with fewer than `expect` complete responses* — and - it is decided before any assertion runs. Reporting a destroyed exchange as `{"", :closed}` was - the old defect; reporting it as a failed `assert bytes =~ "HTTP/1.1 403"` is the same lie with - the sign flipped, a sentence about the server for bytes the server did send. Bounded at 5 - attempts (5% at its worst leaves 3e-7), announced on stderr, and it raises if every attempt is - destroyed. - -**The rejected alternatives stayed rejected.** No timing constant was raised: `@hold_ms` is still -700, and `@read_ms` 10_000 is now a backstop that raises rather than a window that answers. Nothing -runs at `--max-cases 1` and nothing is isolated with a settle interval. - -## The two new anchors, and they move - -`drain/2` was pinned by nothing: it was the instrument, so no test could see it lie. Two tests at -the bottom of the file now drive it from a raw scripted listener, and both were mutated to prove -they carry information (`logs/mutation-harness-anchors.txt`): - - H1 the read terminates on silence again (`collect` hands straight to `settle`) - 162 tests, 2 failures TEST_EXIT=2 - H2 a destroyed exchange is reported as a verdict again ({:destroyed,...} -> {acc, :closed}) - 162 tests, 1 failure TEST_EXIT=2 - unmutated 162 tests, 0 failures - -The suite is **162 tests** where the record's tables say 160: these two are the difference. - -## The direction that matters: a survivor must still read as a survivor - -This is the criterion the PLAN calls load-bearing, because the error ADDS a failure and a table -that reads all-killed is a table nobody investigates. - -`tools/mutate.sh score`, 4 passes per mutant, under 32 busy loops on 32 cores, first with the -harness as it was and then with the harness as it ships. - -**Before** (`logs/red-mutation-under-load.txt`), against slice 003's recorded table: - - M2never 0 failures (SURVIVOR) read 1 | 1 | 1 | 0 <- FALSE KILLED, 3 of 4 passes - Mc2 0 failures (SURVIVOR) read 0 | 0 | 0 | 0 - M13rev 1 read 1 | 2 | 2 | 2 - M2always 1 read 1 | 2 | 2 | 1 - Mc3 2 read 2 | 2 | 3 | 3 - Md1 9 read 9 | 9 | 9 | 9 - Md2 2 read 2 | 3 | 3 | 3 - Me1 1 read 1 | 1 | 1 | 1 - Mr1 4 read 4 | 4 | 5 | 5 - Mr2 3 read 3 | 4 | 3 | 3 - -Round 3 of slice 003 recorded a false KILLED and could not reproduce it on demand. **It is -reproducible on demand**: 16 of 40 scored suites read one failure more than the mutant deserves, -and the row it corrupted is a recorded survivor. - -**After** (`logs/green-mutation-under-load.txt`), same command, same 4 passes, same 32 busy loops, -on the harness as it ships: - - M13rev 1 | 1 | 1 | 1 Md1 9 | 9 | 9 | 9 - M2always 1 | 1 | 1 | 1 Md2 2 | 2 | 2 | 2 - M2never 0 | 0 | 0 | 0 Me1 1 | 1 | 1 | 1 - Mc2 0 | 0 | 0 | 0 Mr1 4 | 4 | 4 | 4 - Mc3 2 | 2 | 2 | 2 Mr2 3 | 3 | 3 | 3 - -**Forty scored suites, zero variance, every row equal to slice 003's recorded table.** Both -survivors survive. The log also names the failing TEST in every row — an addition to the -instrument, because "160 tests, 1 failure" reads identically whether the failure is the mutant's -or the harness's, and that ambiguity is what let round 3's false KILLED be written down. `Md1`, -the mutant that removes the very behaviour this file pins, still kills seven of the nine live -listener tests, so the read logic has not been made unable to fail. - -## The rate after the fix - - mix test --max-cases 8, 100 consecutive runs, idle 0 of 100 (was 2 of 100) - mix test --max-cases 64, 100 consecutive runs, idle 0 of 100 (was 1 of 100) - mix test --max-cases 8, 40 consecutive runs, 32 busy loops 0 of 40 (was 6 of 40 on - the passive-socket draft, and - 3 of 40 before the repeat) - -`logs/green-rate-mc8-idle.txt`, `logs/green-rate-mc64-idle.txt`, `logs/green-rate-mc8-load32.txt`. -The two intermediate drafts are kept as `logs/probe-rate-mc8-load32-passive.txt` and -`logs/probe-rate-mc8-load32-active.txt`, because each is the measurement that refused the fix -before it. - -**N is derived, not chosen.** At the measured red of 2% a 100-run green has a 13% chance of being -luck; the loaded profile is what supplies the power. The loaded run also shows the repeat working -rather than merely present: counting the stderr announcements per suite, - - 36 suites with 4 repeats <- the four the "server that never answers" anchor causes - 3 suites with 5 - 1 suite with 7 - -so **six exchanges in forty loaded suites produced no measurement and were repeated**, and none of -them became a failure. That is the same ~5% loss `logs/probe-loss-site.txt` measured, caught and -named instead of asserted about. - -## What is NOT done here - -- Slice 003's table is not re-scored, and its records are not rewritten. The false KILLED it - recorded is now reproducible, which strengthens that record rather than replacing it. -- PR #15's and PR #17's red push runs were not re-run. -- `lib/` is untouched. No part of this fix needed shipping code. - -## Round 2 - -Appended, not rewritten. Nothing above this heading has been edited; where round 1 showed a -sentence above to be false, the correction is below and says which line it strikes. - -Round 1 closed with `changes-required` from both lanes — -`slices/006-harness-honesty/signoff/round1.m.signoff` and `.../round1.h.signoff`, both on tree -`1563fc672cf217b97d87cecd7c2d653b09e61cf2`, both recorded `2026-09-08T11:59:00Z`. The reviews are -`logs/round1.m.md` and `logs/round1.h.md`. - -### The five blocking findings, and what closed each - -Six blocking headings across two lanes, five distinct findings: lane m's §5 and lane h's H-1 are -the same finding reached independently. - -1. **m §4 — "the repeat can launder a genuine server defect, and nothing pins its bound."** - The repeat fired on `{:tcp_closed, ...}` as well as on an abort, so a listener silent on four - connections and answering on the fifth passed. The harness now separates a FIN from an RST: - `{:tcp_closed, ^sock}` returns `{:unanswered, acc}` and raises at once, and only - `{:tcp_error, ^sock, reason}` returns `{:aborted, reason, acc}` and is repeated. Lane m's - attack is kept as a test — *"a server that closes without answering is reported at once, and - is NOT repeated"*. The bound is pinned by *"a connection aborted every time raises after the - bound instead of looping"*, which writes `5` as a literal on the other side of the comparison - from `@attempts`, so the constant can no longer agree with itself. See the anchor table below: - the old anchor was contained and H4 proves the new one is not. - -2. **m §5 / h H-1 — "the anchor evidence quotes counts the archive does not contain."** - Re-run over the whole suite and re-archived as `logs/mutation-harness-anchors-round2.txt`, - whose header states the command it used. The correction to the round-1 numbers is recorded - under *Corrections* below rather than by editing the round-1 table. - -3. **h H-2 — five citations in `test/beam_mcp/transport/http_bandit_test.exs` that resolve - nowhere.** All five are now prefixed with `slices/006-harness-honesty/`. The set is derived - the way round 1 derived it, not re-read by eye; re-derived at close-out with round 1's own - command, every path in the file now resolves: - - $ for p in $(grep -oE '(slices/[A-Za-z0-9./-]+|logs/[A-Za-z0-9./-]+)\.txt' \ - test/beam_mcp/transport/http_bandit_test.exs | sort -u); do - [ -e "$p" ] && echo "EXISTS $p" || echo "MISSING $p"; done - EXISTS slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt - EXISTS slices/003-release-0-3-1/logs/probe-d-bandit-drain.txt - EXISTS slices/006-harness-honesty/logs/green-mutation-under-load.txt - EXISTS slices/006-harness-honesty/logs/probe-drain-mechanism.txt - EXISTS slices/006-harness-honesty/logs/probe-loss-reason.txt - EXISTS slices/006-harness-honesty/logs/probe-loss-site.txt - EXISTS slices/006-harness-honesty/logs/probe-rate-mc8-load32-passive.txt - EXISTS slices/006-harness-honesty/logs/probe-write-shape.txt - - `probe-loss-reason.txt` is new in round 2 and was cited correctly from the start, which is the - point of deriving the set rather than listing it. - -4. **h H-3 — "the CI table has no archive."** `logs/ci-evidence.txt` is that archive, fetched by - the `gh` commands it prints rather than typed. It records, in its own words, that - `gh run view --log` and `--log-failed` *"both returned EMPTY for the two red runs -- exit - 0, no bytes"*, and that the job-log API is what supplied the transcripts. Neither red run was - re-run. - -5. **h H-4 — "PLAN §4 criteria 4 and 6 are neither discharged nor recorded as undischarged."** - Both are recorded below, under *What is NOT done here, round 2*. Criterion 4 is **not - discharged** and is now named as outstanding rather than gestured at. - -### The suite - - 164 tests, 0 failures - -`logs/green-rate-mc8-idle-round2.txt`, whose header reads `command: mix test --max-cases 8 -(x100 consecutive runs)`, ends every one of its runs on that line followed by `RUN_EXIT=0`, and -closes `== green-rate-mc8-idle-round2: 0 run(s) of 100 exited non-zero ==`. -`logs/mutation-harness-anchors-round2.txt` ends `restored; unmutated:` / `164 tests, 0 failures`. - -**MISSING:** no archive in this slice records the exit under the name `MIX_TEST_EXIT`. The exit -is written as `RUN_EXIT=0` by the rate driver and as `TEST_EXIT=0` by `tools/mutate.sh`; those -are what is quoted above. The value is 0; the variable name is not on disk and is not invented -here. - -### The anchors, re-run at full suite scale - -`logs/mutation-harness-anchors-round2.txt`, header `command per mutant: mix test (the WHOLE -suite, not one file -- round 1 finding B1)`. Every total quoted from that file: - - H1 `if complete_responses(acc) >= expect` -> `if true` 164 tests, 4 failures TEST_EXIT=2 - H2 `{:unanswered, acc}` -> `{acc, :closed}` 164 tests, 1 failure TEST_EXIT=2 - H4 `@attempts 5` -> `@attempts 1` 164 tests, 2 failures TEST_EXIT=2 - H5 `{:unanswered, acc}` -> `{:aborted, :closed, acc}` 164 tests, 1 failure TEST_EXIT=2 - restored; unmutated 164 tests, 0 failures - -**H4 and H5 were INVISIBLE to the round-1 anchors and now kill.** - -- **H4 deletes the repeat outright** — `@attempts 5` to `@attempts 1`. Round 1 lane m showed the - old anchor interpolated `#{@attempts}` into its own expected message, so the constant sat on - both sides of the comparison and the whole suite stayed green with the repeat gone. It now - kills two: *"a connection aborted every time raises after the bound instead of looping"* and - *"an aborted connection is repeated, and the repeat is announced"*. -- **H5 makes a clean close repeatable again** — `{:unanswered, acc}` back to - `{:aborted, :closed, acc}`, which is round 1's laundering defect restored exactly. It kills - *"a server that closes without answering is reported at once, and is NOT repeated"*. Before - round 2 there was no test that could see this at all. - -### The repeat is restricted to `:econnreset` - -`logs/probe-loss-reason.txt`, header `background load: 32 busy loops on 32 cores`, dated -`2026-09-08T12:04:57Z`, 250 runs of the 9 MB refusal against the real listener. Its two tally -lines, quoted whole: - - 231x {297, :econnreset, {:error, :einval}, true} - 19x {0, :econnreset, {:error, :einval}, true} - -Every genuine loss — 19 of 250 — arrives as `:econnreset`. Not one arrives as a clean close. -That is what licenses the harness treating a FIN as a measurement and an RST as the absence of -one, and it is why the repeat may fire on the second and must not fire on the first. - -### The residual under load, and it is the bound firing - -`logs/green-rate-mc8-load32-round2.txt`, header `command: mix test --max-cases 8 (x40 -consecutive runs)` / `background load: 32 concurrent cpu hogs`. Its final summary line: - - == green-rate-mc8-load32-round2: 1 run(s) of 40 exited non-zero == - -The one non-zero run is run 4, `164 tests, 1 failure`, `RUN_EXIT=2`. The failure is the bound, -quoted whole from the archive: - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:550 - ** (RuntimeError) 5 exchange(s) in a row were aborted before a measurement existed. The last ended (:econnreset) after 0 complete response(s) out of 1, having read 0 byte(s): "" - - One aborted exchange is a lost segment and is repeated. 5 of them is not, and it is reported here rather than turned into an assertion about bytes nobody received. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:228: BeamMCP.Transport.HTTPBanditTest.exchange/4 - test/beam_mcp/transport/http_bandit_test.exs:564: (test) - -**Stated plainly: this is the BOUND FIRING, not the old defect returning.** Five consecutive -exchanges were aborted in transit under deliberate CPU starvation, and the harness said so by -name instead of asserting `""` contains `HTTP/1.1 403`. The old red printed a sentence about the -server for bytes the server did send; this prints a sentence about the measurement that does not -exist. It is a different statement with a different remedy. - -**`@attempts` stays at 5.** Raising it is the threshold fix the PLAN rejects — the same move as -widening a timing window, one level up: it does not make the lost segment arrive, it makes the -report of the loss rarer. The bound is derived from the measured loss and not from the run that -hit it, and moving it because a run hit it would be tuning the instrument to the sample. The -residual is recorded here as a residual. - -### Idle - -Final summary lines, quoted: - - == green-rate-mc8-idle-round2: 0 run(s) of 100 exited non-zero == - == green-rate-mc64-idle-round2: 0 run(s) of 100 exited non-zero == - -`logs/green-rate-mc8-idle-round2.txt` (`mix test --max-cases 8`, `background load: 0 concurrent -cpu hogs`) and `logs/green-rate-mc64-idle-round2.txt` (`mix test --max-cases 64`, same). 0 of 100 -and 0 of 100, against a measured red of 2 of 100 and 1 of 100. - -### The mutation table under load, re-scored on the round-2 tree - -`logs/green-mutation-under-load-round2.txt`, `background load: 32 busy loops on 32 cores`, -`passes: 4`, `tree: eff906ca76c6ce59d86c46018e376195ce150efd dirty=10`. Every row of that -file, quoted: - - M13rev | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 - M2always | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 - M2never | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 - Mc2 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 - Mc3 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 - Md1 | 164 tests, 9 failures TEST_EXIT=2 | 164 tests, 9 failures TEST_EXIT=2 | 164 tests, 9 failures TEST_EXIT=2 | 164 tests, 9 failures TEST_EXIT=2 - Md2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 - Me1 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 - Mr1 | 164 tests, 4 failures TEST_EXIT=2 | 164 tests, 4 failures TEST_EXIT=2 | 164 tests, 4 failures TEST_EXIT=2 | 164 tests, 4 failures TEST_EXIT=2 - Mr2 | 164 tests, 3 failures TEST_EXIT=2 | 164 tests, 3 failures TEST_EXIT=2 | 164 tests, 3 failures TEST_EXIT=2 | 164 tests, 3 failures TEST_EXIT=2 - EXIT=0 - -Forty scored suites, zero variance, and **every row equals slice 003's recorded table**: 1, 1, 0, -0, 2, 9, 2, 1, 4, 3. **Both survivors survive** — `M2never` and `Mc2` score `164 tests, 0 -failures TEST_EXIT=0` on all four passes, which is the direction of error this slice exists to -protect, because a table that reads all-killed is a table nobody investigates. Slice 003's table -is not re-scored and its records are not rewritten. - -Three rows now carry the repeat counter `tools/mutate.sh` gained in round 2 — `M13rev` and `Mc3` -`exchanges repeated: 1`, `Mr1` `exchanges repeated: 2`. Round 1 lane h's finding was that a -scored archive kept no trace of a repeat at all, so a defect the repeat absorbed was invisible in -exactly the artefact a verdict is read from. - -### The guard on a dirty mutation target - -`logs/probe-mutate-dirty-target.txt`, dated `2026-09-08T12:15:55Z`. A leftover mutant is planted -in `lib/beam_mcp/transport/http.ex` — *"exactly as a SIGKILLed run would leave it"* — and the -next invocation refuses. Quoted: - - $ PASSES=1 ./tools/mutate.sh score Mc2 - REFUSING: lib/beam_mcp/transport/http.ex has uncommitted changes. - The pristine copy is taken from the working file, so scoring against a dirty target - risks adopting a leftover mutant as the baseline -- see the header. Commit or revert - it, or set MUTATE_ALLOW_DIRTY_TARGET=1 if you have checked it yourself. - SCORE_EXIT=1 - -and, after `git checkout -- lib/beam_mcp/transport/http.ex` clears the planted mutant, the same -command runs: - - Mc2 | 164 tests, 0 failures TEST_EXIT=0 - SCORE_EXIT=0 - -`SCORE_EXIT=1` then `SCORE_EXIT=0`: the guard fires on the dirty target and not on the clean one, -so it is a guard rather than a refusal to run. The archive states what it prevents — -*"WITHOUT THE GUARD this run would have copied the Mr2 mutant to $pristine, scored Mc2 on top of -it, and RESTORED Mr2 afterwards -- leaving the defect in the tree and calling it the baseline."* - -### Corrections, appended rather than rewritten - -**Correction 1 — lines 54-56 above are FALSE.** They read: - -> `logs/red-rate-mc8-idle.txt` and `logs/red-rate-mc64-idle.txt`. All three failures are that same -> test, and each prints what the local rate makes visible and the CI transcript did not — **the -> argument**: - -**The CI transcript did print the argument.** `logs/ci-evidence.txt` holds both red runs' gate -steps whole, and both print it. From run `34174975336` (`seed: 70815, max_cases: 8`): - - 2026-09-08T00:57:48.7471690Z Expected truthy, got false - 2026-09-08T00:57:48.7472276Z code: assert String.contains?(bytes, "HTTP/1.1 403") - 2026-09-08T00:57:48.7472799Z arguments: - 2026-09-08T00:57:48.7473134Z - 2026-09-08T00:57:48.7473453Z # 1 - 2026-09-08T00:57:48.7473785Z "" - 2026-09-08T00:57:48.7474115Z - 2026-09-08T00:57:48.7474427Z # 2 - 2026-09-08T00:57:48.7474797Z "HTTP/1.1 403" - -and from run `34175931068` (`seed: 11394, max_cases: 8`), the same three lines: - - 2026-09-08T01:14:34.4906564Z code: assert String.contains?(bytes, "HTTP/1.1 403") - 2026-09-08T01:14:34.4907114Z arguments: - 2026-09-08T01:14:34.4907467Z - 2026-09-08T01:14:34.4907770Z # 1 - 2026-09-08T01:14:34.4908099Z "" - -**The abridgement was in the summary this slice was briefed from, not in CI's output.** CI -printed `arguments:`, then `# 1`, then `""` — the empty buffer — in both runs, and the slice -wrote down that it had not, because the summary it read had dropped those lines. The conclusion -drawn from the local rate is unaffected; the sentence crediting the local rate with making the -argument visible is not, and it is struck. This is a claim about someone else's output typed -rather than fetched, which is the class CONVENTIONS.md legislates against, committed in the -paragraph that introduces the evidence. - -**Correction 2 — the round-1 anchor table quotes a population its archive does not contain.** -The table under *"The two new anchors, and they move"* above reads: - - H1 ... 162 tests, 2 failures TEST_EXIT=2 - H2 ... 162 tests, 1 failure TEST_EXIT=2 - unmutated 162 tests, 0 failures - -`logs/mutation-harness-anchors.txt` says `11 tests`, three times: - - $ grep -n 'tests,' slices/006-harness-honesty/logs/mutation-harness-anchors.txt - 57:11 tests, 2 failures - 105:11 tests, 1 failure - 110:11 tests, 0 failures - -That run's command, from the archive's own separators, was -`mix test test/beam_mcp/transport/http_bandit_test.exs` — one file, 11 tests. The failure counts -and the exits were right; the population was promoted to the whole-suite number and typed. -`logs/mutation-harness-anchors-round2.txt` is the whole-suite run the table claimed, and it reads -`164 tests`, which is the number to use. The round-1 table stays as written, wrong, with this -beneath it. - -**Correction 3 — the suite count elsewhere in the record.** This slice's own text above says -*"The suite is **162 tests** where the record's tables say 160"*. Round 2 adds two more anchors: -the archives now read `164 tests`. `HANDOFF.md`'s State section still says `162 tests`; it is -stale by two and is the release handoff's line to move, not this slice's to rewrite. - -### RECORD — the round-2 archives carried no discard note when they were retrieved - -At the time the external retrieval of this slice's logs was done, **not one `*-round2` file -carried any note that a run under the same filename had been discarded.** A reader holding those -four files had no way to know that a first attempt existed, that it had been contaminated by a -concurrent `git checkout -- lib/beam_mcp/transport/http.ex`, or that the files in front of them -were the re-run rather than the discarded run. Two of them additionally carry the header line -`background load: 0`, which is the exact line the deleted archive carried falsely. - -The provenance notes now at the top of all four files are what fixed that, and they are written -to be recognisable as what they are: each declares that it was added by hand after the file was -written, ends at a marker line, and claims nothing about the bytes below it except that they are -untouched. The four birth timestamps are quoted in each note because the chain is the evidence: -`12:23:53Z`, `12:30:22Z`, `12:39:18Z`, `12:48:16Z`, each beginning as the previous ends, against -the contaminated driver's `12:14:39Z`. - -The note is prose above a marker, not a rewrite: the bytes below each marker are the driver's -own output and were verified unchanged by hashing them before and after the prepend. - -### What is NOT done here, round 2 - -Everything under the round-1 *"What is NOT done here"* still holds — slice 003's table is not -re-scored, PR #15's and PR #17's red push runs are not re-run, `lib/` is untouched. Added: - -- **PLAN §4 criterion 4 is NOT discharged.** *"Demonstrated at CI's `max_cases: 8`, in CI, not - only locally"* requires a CI run on the round-2 tree, and no such run exists. Every rate above - is local. `logs/ci-evidence.txt` archives the two red runs and one green push-event run on an - earlier tree of this slice; none of them is the tree these commits produce. This is recorded as - outstanding rather than gestured at, which is round 1 lane h's H-4. -- **PLAN §4 criterion 6, "gate green, and green repeatedly."** `logs/gate-round1.txt` holds five - consecutive runs whose every step line reads `pass`, ending `Gate OK.` / `GATE_EXIT=0`, with - `reuse pass (260 tracked; 71 in scope, 69 headered + 2 sidecar; excluded 187 archive + 2 - licence text)`. That file's own header names `HEAD: a02e5603e6a26ff91af775a0b4cd1d88943c707b`, - which is **not** the tree these commits produce, so it discharges the criterion for the round-1 - tree only. `logs/red-gate-credo-nesting.txt` is the red that preceded it. The closing gate run - on the round-2 tree is reported at close-out and is not archived here, because it is run after - the commit that would have to contain it. -- **`@attempts` was not raised**, and the one loaded run that hit the bound was not re-run. -- **No measurement in this section was re-run to produce it.** Every number above is quoted from - a file that was already on disk. - ---- - -# Round 2 - -Round 1 above is left exactly as written. Everything here is appended. - -## The five round-1 blockers, and what closed each - -**B1 — the anchor table quoted `162 tests` beside an archive reading `11 tests`.** Still true of -the Round 1 table, and it is left standing there as the finding it is: that table was produced by -`mix test ` and its population was typed up to the suite total. **Every table in this -Round 2 section reads `164`, quoted from the run that produced it.** - -**B2 — the repeat could launder an intermittently silent server, and its anchor was contained.** -Closed by a distinction rather than a threshold. A FIN and an RST are different statements: only -an abort can destroy a response already written, so only an abort is repeated, and a clean close -with no answer raises immediately. The bound is written as a literal, so `@attempts` no longer -sits on both sides of the comparison. - -**B3 — five unresolvable log citations remained**, all added by this slice. Prefixed. - -**B4 — the CI table had no archive.** `logs/ci-evidence.txt`, fetched by command. - -**B5 — PLAN §4 criterion 4 undischarged in the record.** Discharged at the foot of this section. - -## Correction, appended: CI *did* print the argument - -Round 1 above says the local rate makes visible "what the CI transcript did not — **the -argument**". **That sentence is false and is corrected here rather than deleted.** `ci-evidence.txt` -carries it verbatim, in both red runs: - - arguments: - - # 1 - "" - -The abridgement was in the summary this slice was handed, not in CI's output. A claim about what -an upstream transcript did not contain, made without fetching the transcript, is the same defect -as a typed count. - -## The measurements - -Suite, on the tree that ships: - - 164 tests, 0 failures - -Anchors, `logs/mutation-harness-anchors-round2.txt` — every one moves, including both round-1 -blind spots: - - H1 read terminates on silence again 164 tests, 4 failures TEST_EXIT=2 - H2 clean close reported as a verdict again 164 tests, 1 failure TEST_EXIT=2 - H4 @attempts 5 -> 1, the repeat DELETED 164 tests, 2 failures TEST_EXIT=2 - H5 clean close repeatable again (laundering) 164 tests, 1 failure TEST_EXIT=2 - -H4 and H5 are the ones that were invisible in round 1: H4 because the expected text interpolated -`@attempts`, H5 because nothing modelled a server that answers only on a later attempt. - -Rates: - - == green-rate-mc8-idle-round2: 0 run(s) of 100 exited non-zero == - == green-rate-mc64-idle-round2: 0 run(s) of 100 exited non-zero == - == green-rate-mc8-load32-round2: 1 run(s) of 40 exited non-zero == - -**0 of 200 at both CI profiles.** The loaded residual is one run in forty, and it is the bound -working rather than a regression: - - ** (RuntimeError) 5 exchange(s) in a row were aborted before a measurement existed. The last - ended (:econnreset) after 0 complete response(s) out of 1, having read 0 byte(s): "" - -The old code turned that identical condition into `assert bytes =~ "HTTP/1.1 403"` — a sentence -about the server, for bytes the server did send. **`@attempts` stays at 5.** Raising it to 7 makes -the residual disappear at that load and is the threshold class this PLAN rejects; this repository -already bought one threshold fix for this test and it came back. - -Criterion 3, the load-bearing one, is discharged on the clean loaded table: forty scored suites, -every row equal to slice 003's record, zero variance, and **both recorded survivors still survive** -— `M2never 0|0|0|0` and `Mc2 0|0|0|0`. A known survivor still reporting as a survivor under the -conditions that produced the false kill is the only check that tests the instrument against a -value known by other means rather than against itself. - -`Me1 | 164 tests, 1 failure` on all four passes: the `header_values/2` UTF-8 guard is pinned by a -mutant that moves. - -## An uncertainty this section does not resolve - -The four `*-round2` archives carry hand-added provenance notes asserting they are the clean -re-run, on the evidence that their filesystem birth times form a serial chain. **That evidence no -longer exists, and prepending the notes is what destroyed it** — all four now share one birth to -the millisecond, with birth equal to mtime, the signature of a wholesale rewrite. - -What survives is the driver's own `date:` lines (12:23:53Z, 12:30:22Z, 12:39:18Z, 12:48:16Z), -which establish one serial run but cannot independently rule out interference in its opening -minutes. There is **no later quiet-machine scoring table to cite instead**: -`mutation-harness-anchors-round2.txt` is earlier, at 12:06:42Z. - -So: the loaded table is **probably** the clean re-run and the internal dates support it, but the -corroboration originally offered for that is gone. Recorded here rather than argued away, and the -correction is appended to each of the four archives. - -## Still open - -- **PLAN §4 criterion 4 — demonstrated in CI** — is discharged by the push-event run recorded on - PR #16, not by this file. -- The loaded residual above is recorded, not eliminated. - -## A limitation of the signoff instrument, found by using it - -The PLAN caps this slice at three rounds. It ran **four**, and the reason is a property of -`tools/signoff.sh` rather than a fourth review. - -`verify` hashes HEAD's tree with `slices/*/signoff/` removed. Everything else is in it — including -`.gitignore` and every document. So **any commit made after the lanes record, however unrelated, -marks their verdicts STALE and refuses the slice.** Observed twice here: - -1. Rebasing onto PR #18 (11 deleted lines in two `.md` files) invalidated round 2. -2. Untracking `signoff/verify.txt` and adding one `.gitignore` comment invalidated round 3. - -Neither touched anything a lane had examined. The guard is not wrong — a verdict really was -recorded against a different tree — but the cost is that **the last fix before a PR always -forces another round**, and a reviewer who wants to close cheaply is pushed toward recording an -approval for a tree they have not re-read. That is the pressure the instrument exists to remove, -reappearing on its other side. - -Recorded, not fixed. Two shapes worth measuring if this is taken further: excluding a declared set -of non-executable paths from the review tree the way `signoff/` is already excluded, or having -`record` name the commit it binds so the pin does not have to live inside the tree it pins. - -The working discipline meanwhile, learned here: **make every tree change first, record last.** diff --git a/slices/006-harness-honesty/PLAN.md b/slices/006-harness-honesty/PLAN.md deleted file mode 100644 index 59e2c0c7..00000000 --- a/slices/006-harness-honesty/PLAN.md +++ /dev/null @@ -1,136 +0,0 @@ - - -# Slice 006 — harness honesty: a gate run must be a measurement, not a sample - -**Issue:** SCR-289. **Written before any code.** - -**006 is the number; it runs FIRST.** Slice 005 (tool identity) already started — its PLAN is -committed and PR #15 is open — so 005 is taken. Under the numbering rule, a number is identity -assigned when a slice starts, and **order is not number**: this slice is 006 and it goes ahead of -005. That separation is the rule working rather than an exception to it. - -**Why it goes first.** A test defect reaching CI means every *"gate green, every step line reading -pass"* in this repository is currently a **sample rather than a measurement**. That sentence is -the evidence behind every slice record here. Nothing that depends on mutation scoring — 005's -acceptance criterion 2 does — can be recorded honestly until it is true again. - ---- - -## 0. What is actually wrong, read from the code rather than the issue - -`test/beam_mcp/transport/http_bandit_test.exs`, `drain/2`: - - @first_byte_ms 10_000 - @quiet_ms 700 - - defp drain(sock, acc) do - timeout = if acc == "", do: @first_byte_ms, else: @quiet_ms - case :gen_tcp.recv(sock, 0, timeout) do - {:ok, data} -> drain(sock, acc <> data) - {:error, :timeout} -> {acc, :open} - {:error, :closed} -> {acc, :closed} - end - end - -**The read terminates on a wall-clock silence, not on a protocol event.** Once any byte has -arrived, a gap longer than 700 ms is interpreted as "the server is done and holding the -connection". Under load a gap that long is ordinary, so the function returns a **partial buffer** -and reports `:open`, and every assertion downstream is then made against bytes that had not -finished arriving. - -This is already a documented repair of a previous instance of itself. The comment above those two -attributes records that a **single** 700 ms window made the 9 MB case flaky, and that it presented -as *"a SURVIVING mutant scoring as KILLED"*. The repair split one window into two and made the -first generous. **It reduced the rate and did not remove the mechanism**, which is why the same -test failed again in CI at `max_cases: 8`. - -That is the finding to keep in front of the work: the previous fix was a threshold change, and a -threshold change cannot fix a race. This slice replaces the mechanism. - -## 1. The three observations this slice must account for - -| when | where | how it presented | -|---|---|---| -| slice 003 round 3 | dev machine, `max_cases: 64` | `Mc2`, a **survivor**, scored as **KILLED** | -| slice 003 re-score | dev machine, 40 back-to-back suites | `M13rev` read 2 (record 1), `Mr2` read 4 (record 3) | -| PR #15 push run | **GitHub Actions, `max_cases: 8`** | `test FAIL (exit 2)`, `assert String.contains?(bytes, "HTTP/1.1 403")`, on a commit containing **no code** | - -One mechanism, three load profiles, and the error always has the same direction: **it adds a -failure.** A flake that removes a failure makes a table pessimistic and someone investigates. One -that adds a failure makes a table read all-killed, and nobody does. - -## 2. Red first, and the red is a RATE - -An intermittent defect has no single transcript. The red is a measured rate, captured whole: - -1. **N consecutive runs of the Bandit test file**, on the development machine, recording *k* - spurious failures and naming the failing test each time. -2. **The same at `--max-cases 8`**, because that is CI's profile and where the consequential - failure was caught. A rate measured only at 64 has not been measured where it failed. -3. **N is derived from the observed rate, not chosen.** One failure in ~20 CI runs and two in 40 - local suites are the starting estimates; the PLAN's first act is to measure the rate properly - so that "no failures after the fix" is a claim with power behind it rather than a short run - that got lucky. - -## 3. The fix: remove the wall-clock window, do not retune it - -**Requirement, not a candidate.** `drain/2` must terminate on something the protocol determines, -not on elapsed silence. The shape to settle in this PLAN before code: - -- read until the socket closes, or until the expected number of **complete** HTTP responses has - been parsed — `Content-Length` is present on every response this suite asserts against, so - completeness is decidable from the bytes; -- keep a timeout **only** as a stuck-test backstop, long enough that reaching it is a failure of - the test rather than a verdict of it, and assert on reaching it rather than returning a partial - buffer silently; -- `:open` versus `:closed` must remain distinguishable, since three tests assert on it. Deciding - how, without a silence window, is the design question this slice answers. - -**The rejected alternatives are named so they are not revisited:** raising `@quiet_ms`, running the -mutation set with `--max-cases 1`, and running mutants in isolation with a settle interval. Each -lowers the rate on one profile and leaves the mechanism. The repository has already bought the -threshold fix once. - -## 4. Acceptance criterion, as a measurement - -1. **The rate is measured before the fix** (§2), at both `max_cases` profiles, captured whole. -2. **After the fix, zero spurious failures over a run derived from that rate** — the population - comes from the measurement, not from a round number. -3. **A known SURVIVOR still reports as a survivor under the conditions that produced the false - kill.** `M2never` or `Mc2` from slice 003, scored under sustained back-to-back load. This is the - criterion that matters: the direction of the error is what makes it dangerous, and a fix that is - only shown not to *add* failures on a quiet machine has not been tested where it lied. -4. **Demonstrated at CI's `max_cases: 8`**, in CI, not only locally. -5. **The mutation harness is committed**, under `tools/`. Slice 003's record cites `$S/mut.sh - `, a scratchpad path no future reader can resolve. A scoring instrument that cannot be - re-run is not evidence — the same rule that governs archives: written by a command that can - fetch it, or it does not exist. The nine mutant scripts and the pristine-file discipline move - with it. -6. **Gate green, and green repeatedly.** A single green run is precisely the claim this slice - exists to stop trusting, so the gate is run enough times to have caught the measured rate. - -## 5. What this slice does NOT do - -- **It does not re-score slice 003.** That table is the isolated runs, its two survivors are - recorded as survivors with their arguments, and its record already carries the instability. -- **It does not re-run PR #15's red check.** That failure is standing evidence and stays red until - this slice lands. A green re-run would destroy the only artefact showing a no-code commit failing. -- It does not touch `lib/`. If the fix requires a change to shipping code, that is a finding and - the slice stops and reports rather than widening. - -## 6. Process - -Two lanes, three rounds maximum, closing rule written before round 1 opens. Every round writes both -a verdict and a tree pin per lane, bound with `tools/signoff.sh`. - -**This brief supersedes the earlier "do not spawn further subagents": the lanes may spawn.** A lane -that cannot says so in its own verdict rather than letting "two lanes" imply independence it does -not have. - -**One caution specific to this slice.** Its own acceptance criteria are measured with the -instrument it is repairing. A run that says the fix worked is subject to the same doubt as a run -that said a survivor was killed — so criterion 3 is the load-bearing one, because it checks the -instrument against a value already known by other means rather than against itself. diff --git a/slices/006-harness-honesty/logs/ci-evidence.txt b/slices/006-harness-honesty/logs/ci-evidence.txt deleted file mode 100644 index d6573072..00000000 --- a/slices/006-harness-honesty/logs/ci-evidence.txt +++ /dev/null @@ -1,668 +0,0 @@ -== the CI evidence, fetched by gh rather than transcribed == -fetched: 2026-09-08T12:09:29Z - -Round 1 lane h, blocking finding B4: the CI table is the PREMISE of this slice -- it is why -006 runs ahead of 005 -- and it had no archive. The run ids, the seeds and the push-run -tallies appeared nowhere but in FINDINGS.md. This file is that archive, fetched by the -commands shown and never typed. - -NOTE ON HOW IT WAS FETCHED. `gh run view --log` and `--log-failed` both returned -EMPTY for the two red runs -- exit 0, no bytes. The job-log API returns them, so that is -what is used below. Recorded because a command that succeeds and produces nothing is -exactly how an archive comes to exist without contents. - -$ gh run list --branch main --limit 12 --json databaseId,event,conclusion,headSha,createdAt -[{"conclusion":"success","createdAt":"2026-09-08T01:00:29Z","databaseId":34175189971,"event":"push","headSha":"2e2c18f9fb2fc1012d292e96e76ca76635e7e6a2"},{"conclusion":"success","createdAt":"2026-09-08T00:38:15Z","databaseId":34173962570,"event":"push","headSha":"62f80402bd1ee7759ded5724f9c66d3a6cb0cd45"},{"conclusion":"success","createdAt":"2026-09-08T00:03:28Z","databaseId":34172061265,"event":"push","headSha":"955d5013e5e9e415f89d06f1077049f56fae1c62"},{"conclusion":"success","createdAt":"2026-09-07T22:10:19Z","databaseId":34165729361,"event":"push","headSha":"31bcbffe21a370fa26b839e70cec94c5f17b9989"},{"conclusion":"success","createdAt":"2026-09-07T09:59:11Z","databaseId":34109013543,"event":"push","headSha":"bee3d266e4f2cfe1c67afb7d222f173d66eeba3f"},{"conclusion":"success","createdAt":"2026-09-07T09:06:48Z","databaseId":34104184888,"event":"push","headSha":"0332c4179c582b5013cc83c2ac7c11444a169fbb"},{"conclusion":"success","createdAt":"2026-09-07T00:51:59Z","databaseId":34071151221,"event":"push","headSha":"5d8d1ae8061841b4aec9a746407d314b11a17bf1"},{"conclusion":"success","createdAt":"2026-09-06T21:48:07Z","databaseId":34062141707,"event":"push","headSha":"38e3177b9f137429acb052d6c1f28be8ea4def09"},{"conclusion":"success","createdAt":"2026-09-06T21:46:26Z","databaseId":34062066619,"event":"push","headSha":"9ee6534fb4b226ffaa44e7570cd36c4724971c83"},{"conclusion":"success","createdAt":"2026-09-06T21:43:59Z","databaseId":34061947451,"event":"dynamic","headSha":"56f6d929ae3511825c51666265494f91b6cb9b63"},{"conclusion":"success","createdAt":"2026-09-06T21:14:43Z","databaseId":34060464454,"event":"push","headSha":"56f6d929ae3511825c51666265494f91b6cb9b63"},{"conclusion":"success","createdAt":"2026-09-06T20:50:12Z","databaseId":34059212793,"event":"push","headSha":"2add129e65d04759ce67c77520208b854c05dcee"}] - -$ gh run list --branch slice/006-harness-honesty --limit 12 --json databaseId,event,conclusion,headSha,createdAt -[{"conclusion":"success","createdAt":"2026-09-08T11:46:24Z","databaseId":34222448137,"event":"pull_request","headSha":"90e4e99f8bda256fc7c5a526e4fc2b3bd8ef6d25"},{"conclusion":"success","createdAt":"2026-09-08T11:46:21Z","databaseId":34222444081,"event":"push","headSha":"90e4e99f8bda256fc7c5a526e4fc2b3bd8ef6d25"},{"conclusion":"success","createdAt":"2026-09-08T02:40:50Z","databaseId":34180888998,"event":"pull_request","headSha":"24370ce8772c10135bcf5da1559653cfc520b31b"},{"conclusion":"success","createdAt":"2026-09-08T02:40:47Z","databaseId":34180887155,"event":"push","headSha":"24370ce8772c10135bcf5da1559653cfc520b31b"},{"conclusion":"success","createdAt":"2026-09-08T01:03:23Z","databaseId":34175355927,"event":"pull_request","headSha":"9a4a75642c6c2c4b8b9e6c5c74058d53281b4972"},{"conclusion":"success","createdAt":"2026-09-08T01:03:20Z","databaseId":34175353368,"event":"push","headSha":"9a4a75642c6c2c4b8b9e6c5c74058d53281b4972"}] - -== THE TWO RED RUNS. Left red as standing evidence; only READ here, never re-run. == - -$ gh run view 34174975336 --json databaseId,event,conclusion,headBranch,headSha -{"conclusion":"failure","databaseId":34174975336,"event":"push","headBranch":"slice/005-tool-identity","headSha":"e3df1e56bb7ad82cd0d3707ddf8d278e54e12ea5"} -$ gh api repos/ScriptKittyOS/beam_mcp/actions/jobs/101902471880/logs -- the gate step, whole -2026-09-08T00:56:54.8065680Z == beam_mcp gate == -2026-09-08T00:56:55.2929244Z format pass -2026-09-08T00:57:31.3041388Z compile pass -2026-09-08T00:57:48.7207593Z test FAIL (exit 2) -2026-09-08T00:57:48.7224066Z ==> file_system -2026-09-08T00:57:48.7224844Z Compiling 7 files (.ex) -2026-09-08T00:57:48.7227348Z Generated file_system app -2026-09-08T00:57:48.7228244Z ==> mime -2026-09-08T00:57:48.7228677Z Compiling 1 file (.ex) -2026-09-08T00:57:48.7229226Z Generated mime app -2026-09-08T00:57:48.7229953Z ==> bunt -2026-09-08T00:57:48.7230441Z Compiling 2 files (.ex) -2026-09-08T00:57:48.7230926Z Generated bunt app -2026-09-08T00:57:48.7231361Z ==> jason -2026-09-08T00:57:48.7231770Z Compiling 10 files (.ex) -2026-09-08T00:57:48.7232273Z Generated jason app -2026-09-08T00:57:48.7232756Z ==> plug_crypto -2026-09-08T00:57:48.7233281Z Compiling 5 files (.ex) -2026-09-08T00:57:48.7233801Z Generated plug_crypto app -2026-09-08T00:57:48.7235547Z ==> hpax -2026-09-08T00:57:48.7236005Z Compiling 4 files (.ex) -2026-09-08T00:57:48.7236514Z Generated hpax app -2026-09-08T00:57:48.7237032Z ==> beam_mcp -2026-09-08T00:57:48.7237530Z ===> Analyzing applications... -2026-09-08T00:57:48.7238078Z ===> Compiling telemetry -2026-09-08T00:57:48.7238563Z ==> thousand_island -2026-09-08T00:57:48.7239048Z Compiling 18 files (.ex) -2026-09-08T00:57:48.7239594Z Generated thousand_island app -2026-09-08T00:57:48.7240118Z ==> credo -2026-09-08T00:57:48.7240535Z Compiling 257 files (.ex) -2026-09-08T00:57:48.7241081Z Generated credo app -2026-09-08T00:57:48.7241514Z ==> plug -2026-09-08T00:57:48.7241969Z Compiling 1 file (.erl) -2026-09-08T00:57:48.7242426Z Compiling 42 files (.ex) -2026-09-08T00:57:48.7242825Z Generated plug app -2026-09-08T00:57:48.7243172Z ==> websock -2026-09-08T00:57:48.7243528Z Compiling 1 file (.ex) -2026-09-08T00:57:48.7243893Z Generated websock app -2026-09-08T00:57:48.7244275Z ==> bandit -2026-09-08T00:57:48.7244590Z Compiling 54 files (.ex) -2026-09-08T00:57:48.7245373Z Generated bandit app -2026-09-08T00:57:48.7245842Z ==> beam_mcp -2026-09-08T00:57:48.7246240Z Compiling 6 files (.ex) -2026-09-08T00:57:48.7246602Z Generated beam_mcp app -2026-09-08T00:57:48.7246988Z Running ExUnit with seed: 70815, max_cases: 8 -2026-09-08T00:57:48.7247406Z -2026-09-08T00:57:48.7248062Z ............................. warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. -2026-09-08T00:57:48.7248707Z -2026-09-08T00:57:48.7249307Z │ -2026-09-08T00:57:48.7249685Z 12 │ use Plug.Test -2026-09-08T00:57:48.7250069Z │ ~~~~~~~~~~~~~ -2026-09-08T00:57:48.7250438Z │ -2026-09-08T00:57:48.7251031Z └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) -2026-09-08T00:57:48.7251566Z -2026-09-08T00:57:48.7251863Z ............ -2026-09-08T00:57:48.7252850Z 00:57:44.520 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -2026-09-08T00:57:48.7253902Z ........... -2026-09-08T00:57:48.7254807Z 00:57:44.854 [error] ** (Plug.BadRequestError) could not process the request due to client error -2026-09-08T00:57:48.7256285Z test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 -2026-09-08T00:57:48.7257382Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7258092Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T00:57:48.7258742Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T00:57:48.7259398Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7260057Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7261068Z test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 -2026-09-08T00:57:48.7262073Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7262563Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7263119Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7263823Z -2026-09-08T00:57:48.7264184Z .... -2026-09-08T00:57:48.7264694Z 00:57:44.876 [error] ** (Plug.BadRequestError) could not process the request due to client error -2026-09-08T00:57:48.7265661Z test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 -2026-09-08T00:57:48.7266330Z (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 -2026-09-08T00:57:48.7267020Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 -2026-09-08T00:57:48.7267700Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7268372Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 -2026-09-08T00:57:48.7269061Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 -2026-09-08T00:57:48.7269762Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 -2026-09-08T00:57:48.7270485Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7271144Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7272174Z test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 -2026-09-08T00:57:48.7273144Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7273646Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7274364Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7275016Z -2026-09-08T00:57:48.7275370Z ... -2026-09-08T00:57:48.7275744Z 00:57:44.884 [error] ** (RuntimeError) SECRET internal detail -2026-09-08T00:57:48.7277128Z test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 -2026-09-08T00:57:48.7277983Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7278624Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7279538Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T00:57:48.7280194Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T00:57:48.7280849Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7281690Z test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 -2026-09-08T00:57:48.7282517Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7283010Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7283544Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7284056Z -2026-09-08T00:57:48.7284378Z ..... -2026-09-08T00:57:48.7284777Z 00:57:44.885 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token -2026-09-08T00:57:48.7286059Z test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7287180Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7287866Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T00:57:48.7288541Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T00:57:48.7289169Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7289815Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7290901Z test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7291952Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T00:57:48.7292934Z test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7293868Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7294415Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7295233Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7295763Z -2026-09-08T00:57:48.7296088Z -2026-09-08T00:57:48.7296415Z 00:57:44.885 [error] ** (throw) :authorize_threw -2026-09-08T00:57:48.7297402Z test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7298517Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7299195Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T00:57:48.7299830Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T00:57:48.7300440Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7301070Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7302364Z test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7303397Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T00:57:48.7303902Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T00:57:48.7304810Z test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7306008Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7306588Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7307149Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7307661Z -2026-09-08T00:57:48.7307946Z -2026-09-08T00:57:48.7308321Z 00:57:44.887 [error] ** (exit) :authorize_exited -2026-09-08T00:57:48.7309274Z test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7310424Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7311069Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T00:57:48.7311819Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T00:57:48.7312459Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7313105Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7314155Z test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7315348Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T00:57:48.7315897Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T00:57:48.7316852Z test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T00:57:48.7317835Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7318332Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7318868Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7319403Z -2026-09-08T00:57:48.7319709Z .. -2026-09-08T00:57:48.7320142Z 00:57:44.921 [error] ** (KeyError) key :input_schema not found in: %{name: :echo} -2026-09-08T00:57:48.7320782Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 -2026-09-08T00:57:48.7321427Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7322060Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 -2026-09-08T00:57:48.7322799Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 -2026-09-08T00:57:48.7323488Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 -2026-09-08T00:57:48.7324307Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7325038Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7326037Z test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 -2026-09-08T00:57:48.7327200Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7327783Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7328566Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7329123Z -2026-09-08T00:57:48.7329401Z . -2026-09-08T00:57:48.7329828Z 00:57:44.921 [error] ** (RuntimeError) host dispatch exploded -2026-09-08T00:57:48.7330657Z test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 -2026-09-08T00:57:48.7331572Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7332146Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7332738Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T00:57:48.7333447Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T00:57:48.7334064Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7335166Z test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 -2026-09-08T00:57:48.7335983Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7336446Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7337043Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7337553Z -2026-09-08T00:57:48.7337865Z ............... -2026-09-08T00:57:48.7338296Z 00:57:45.037 [error] ** (RuntimeError) ordinary fault -2026-09-08T00:57:48.7339212Z test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 -2026-09-08T00:57:48.7340249Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7340811Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7341433Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T00:57:48.7342129Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T00:57:48.7342755Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7343758Z test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 -2026-09-08T00:57:48.7344678Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7345342Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7345943Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7346454Z -2026-09-08T00:57:48.7346787Z ..... -2026-09-08T00:57:48.7347319Z 00:57:45.038 [error] ** (throw) :thrown_secret -2026-09-08T00:57:48.7348193Z test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T00:57:48.7349275Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7350001Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7350794Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T00:57:48.7351547Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T00:57:48.7352262Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7353509Z test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T00:57:48.7354627Z (elixir 1.18.5) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3 -2026-09-08T00:57:48.7355839Z test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T00:57:48.7356911Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7357466Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7358033Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7358625Z -2026-09-08T00:57:48.7358993Z -2026-09-08T00:57:48.7359366Z 00:57:45.039 [error] ** (exit) :kaboom_secret -2026-09-08T00:57:48.7360335Z test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T00:57:48.7361517Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7362106Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7363055Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T00:57:48.7363751Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T00:57:48.7364476Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7365780Z test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T00:57:48.7366814Z (elixir 1.18.5) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3 -2026-09-08T00:57:48.7367822Z test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T00:57:48.7368801Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7369368Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7370073Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7370659Z -2026-09-08T00:57:48.7370991Z .. -2026-09-08T00:57:48.7371643Z 00:57:45.043 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -2026-09-08T00:57:48.7372486Z .... -2026-09-08T00:57:48.7373280Z 00:57:45.146 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -2026-09-08T00:57:48.7374054Z ............... -2026-09-08T00:57:48.7375237Z 00:57:45.303 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "***10.0.0.5/prod"} -2026-09-08T00:57:48.7375865Z ..... -2026-09-08T00:57:48.7376341Z 00:57:45.313 [error] ** (throw) :catalog_unavailable -2026-09-08T00:57:48.7377080Z test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 -2026-09-08T00:57:48.7378095Z (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 -2026-09-08T00:57:48.7378928Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 -2026-09-08T00:57:48.7379683Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7380521Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 -2026-09-08T00:57:48.7381308Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 -2026-09-08T00:57:48.7382088Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 -2026-09-08T00:57:48.7382845Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7383577Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7384832Z test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 -2026-09-08T00:57:48.7386129Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7386643Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7387251Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7387883Z -2026-09-08T00:57:48.7388182Z ..... -2026-09-08T00:57:48.7388667Z 00:57:45.365 [error] ** (RuntimeError) ordinary fault -2026-09-08T00:57:48.7389631Z test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 -2026-09-08T00:57:48.7390787Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7391383Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T00:57:48.7392084Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T00:57:48.7392825Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T00:57:48.7393428Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7394464Z test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 -2026-09-08T00:57:48.7395631Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7396365Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7396930Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7397472Z -2026-09-08T00:57:48.7397800Z ....... -2026-09-08T00:57:48.7398217Z 00:57:45.386 [info] beam_mcp: refused by host authorize/1: :nope -2026-09-08T00:57:48.7399155Z ........ -2026-09-08T00:57:48.7399735Z 00:57:45.438 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -2026-09-08T00:57:48.7400358Z . -2026-09-08T00:57:48.7401496Z 00:57:45.492 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, ...>> -2026-09-08T00:57:48.7402407Z (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 -2026-09-08T00:57:48.7403124Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 -2026-09-08T00:57:48.7403770Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7404823Z test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 -2026-09-08T00:57:48.7406109Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T00:57:48.7406593Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T00:57:48.7407126Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T00:57:48.7408384Z -2026-09-08T00:57:48.7408689Z ......... -2026-09-08T00:57:48.7409115Z 00:57:45.506 [error] ** (RuntimeError) authorize exploded -2026-09-08T00:57:48.7410131Z test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 -2026-09-08T00:57:48.7411200Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T00:57:48.7411861Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T00:57:48.7412506Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T00:57:48.7413216Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T00:57:48.7413867Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T00:57:48.7414461Z (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 -2026-09-08T00:57:48.7415172Z (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 -2026-09-08T00:57:48.7415778Z (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 -2026-09-08T00:57:48.7416552Z (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 -2026-09-08T00:57:48.7417262Z (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 -2026-09-08T00:57:48.7417915Z (stdlib 7.3.0.2) gen_server.erl:2424: :gen_server.try_handle_continue/3 -2026-09-08T00:57:48.7418442Z (stdlib 7.3.0.2) gen_server.erl:2291: :gen_server.loop/4 -2026-09-08T00:57:48.7418951Z (stdlib 7.3.0.2) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 -2026-09-08T00:57:48.7419396Z -2026-09-08T00:57:48.7419688Z ... -2026-09-08T00:57:48.7420132Z 00:57:46.230 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -2026-09-08T00:57:48.7420707Z . -2026-09-08T00:57:48.7421104Z 00:57:46.343 [info] beam_mcp: refused by host authorize/1: :nope -2026-09-08T00:57:48.7421532Z -2026-09-08T00:57:48.7421829Z -2026-09-08T00:57:48.7430193Z 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) -2026-09-08T00:57:48.7461247Z ##[error] test/beam_mcp/transport/http_bandit_test.exs:300 -2026-09-08T00:57:48.7471690Z Expected truthy, got false -2026-09-08T00:57:48.7472276Z code: assert String.contains?(bytes, "HTTP/1.1 403") -2026-09-08T00:57:48.7472799Z arguments: -2026-09-08T00:57:48.7473134Z -2026-09-08T00:57:48.7473453Z # 1 -2026-09-08T00:57:48.7473785Z "" -2026-09-08T00:57:48.7474115Z -2026-09-08T00:57:48.7474427Z # 2 -2026-09-08T00:57:48.7474797Z "HTTP/1.1 403" -2026-09-08T00:57:48.7475388Z -2026-09-08T00:57:48.7475708Z stacktrace: -2026-09-08T00:57:48.7476135Z test/beam_mcp/transport/http_bandit_test.exs:315: (test) -2026-09-08T00:57:48.7476571Z -2026-09-08T00:57:48.7476861Z . -2026-09-08T00:57:48.7477220Z 00:57:47.061 [info] beam_mcp: refused by host authorize/1: :nope -2026-09-08T00:57:48.7477680Z ........... -2026-09-08T00:57:48.7478125Z Finished in 4.5 seconds (1.3s async, 3.2s sync) -2026-09-08T00:57:48.7478539Z 160 tests, 1 failure -2026-09-08T00:57:50.0828635Z credo pass -2026-09-08T00:57:52.9638583Z optional deps pass -2026-09-08T00:57:53.8502379Z docs pass -2026-09-08T00:57:53.9528687Z reuse pass (235 tracked; 59 in scope, 57 headered + 2 sidecar; excluded 174 archive + 2 licence text) -2026-09-08T00:57:53.9529339Z licence files pass -2026-09-08T00:57:53.9529838Z GATE FAILED. - -$ gh run view 34175931068 --json databaseId,event,conclusion,headBranch,headSha -{"conclusion":"failure","databaseId":34175931068,"event":"push","headBranch":"chore/hold-0-3-1","headSha":"84574e6e115c359ba0707cbd3c4cc655bb3a6c58"} -$ gh api repos/ScriptKittyOS/beam_mcp/actions/jobs/101905191592/logs -- the gate step, whole -2026-09-08T01:13:43.1353913Z == beam_mcp gate == -2026-09-08T01:13:43.6728204Z format pass -2026-09-08T01:14:17.4087259Z compile pass -2026-09-08T01:14:34.4680770Z test FAIL (exit 2) -2026-09-08T01:14:34.4697789Z ==> file_system -2026-09-08T01:14:34.4698152Z Compiling 7 files (.ex) -2026-09-08T01:14:34.4698575Z Generated file_system app -2026-09-08T01:14:34.4698969Z ==> mime -2026-09-08T01:14:34.4699300Z Compiling 1 file (.ex) -2026-09-08T01:14:34.4699704Z Generated mime app -2026-09-08T01:14:34.4700127Z ==> bunt -2026-09-08T01:14:34.4700429Z Compiling 2 files (.ex) -2026-09-08T01:14:34.4700802Z Generated bunt app -2026-09-08T01:14:34.4701125Z ==> jason -2026-09-08T01:14:34.4701452Z Compiling 10 files (.ex) -2026-09-08T01:14:34.4701831Z Generated jason app -2026-09-08T01:14:34.4702189Z ==> plug_crypto -2026-09-08T01:14:34.4702546Z Compiling 5 files (.ex) -2026-09-08T01:14:34.4702923Z Generated plug_crypto app -2026-09-08T01:14:34.4703304Z ==> hpax -2026-09-08T01:14:34.4703619Z Compiling 4 files (.ex) -2026-09-08T01:14:34.4703992Z Generated hpax app -2026-09-08T01:14:34.4704448Z ==> beam_mcp -2026-09-08T01:14:34.4704893Z ===> Analyzing applications... -2026-09-08T01:14:34.4705308Z ===> Compiling telemetry -2026-09-08T01:14:34.4705577Z ==> thousand_island -2026-09-08T01:14:34.4705817Z Compiling 18 files (.ex) -2026-09-08T01:14:34.4706285Z Generated thousand_island app -2026-09-08T01:14:34.4706561Z ==> credo -2026-09-08T01:14:34.4706810Z Compiling 257 files (.ex) -2026-09-08T01:14:34.4707084Z Generated credo app -2026-09-08T01:14:34.4707326Z ==> plug -2026-09-08T01:14:34.4707548Z Compiling 1 file (.erl) -2026-09-08T01:14:34.4707813Z Compiling 42 files (.ex) -2026-09-08T01:14:34.4708074Z Generated plug app -2026-09-08T01:14:34.4708302Z ==> websock -2026-09-08T01:14:34.4708524Z Compiling 1 file (.ex) -2026-09-08T01:14:34.4708773Z Generated websock app -2026-09-08T01:14:34.4709002Z ==> bandit -2026-09-08T01:14:34.4709218Z Compiling 54 files (.ex) -2026-09-08T01:14:34.4709468Z Generated bandit app -2026-09-08T01:14:34.4709702Z ==> beam_mcp -2026-09-08T01:14:34.4709928Z Compiling 6 files (.ex) -2026-09-08T01:14:34.4710173Z Generated beam_mcp app -2026-09-08T01:14:34.4710677Z warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. -2026-09-08T01:14:34.4711174Z -2026-09-08T01:14:34.4711608Z │ -2026-09-08T01:14:34.4711883Z 12 │ use Plug.Test -2026-09-08T01:14:34.4712150Z │ ~~~~~~~~~~~~~ -2026-09-08T01:14:34.4712379Z │ -2026-09-08T01:14:34.4712904Z └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) -2026-09-08T01:14:34.4713334Z -2026-09-08T01:14:34.4713570Z Running ExUnit with seed: 11394, max_cases: 8 -2026-09-08T01:14:34.4713870Z -2026-09-08T01:14:34.4714067Z .............. -2026-09-08T01:14:34.4715024Z 01:14:30.277 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -2026-09-08T01:14:34.4716535Z ..................................... -2026-09-08T01:14:34.4716852Z 01:14:30.730 [error] ** (RuntimeError) ordinary fault -2026-09-08T01:14:34.4717981Z test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 -2026-09-08T01:14:34.4718966Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4719483Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4720039Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T01:14:34.4720617Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T01:14:34.4721165Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4722130Z test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 -2026-09-08T01:14:34.4723018Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4723408Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4723874Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4724314Z -2026-09-08T01:14:34.4724604Z .. -2026-09-08T01:14:34.4724919Z 01:14:30.770 [error] ** (KeyError) key :input_schema not found in: %{name: :echo} -2026-09-08T01:14:34.4725518Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 -2026-09-08T01:14:34.4726654Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4727286Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 -2026-09-08T01:14:34.4727912Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 -2026-09-08T01:14:34.4728514Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 -2026-09-08T01:14:34.4729072Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4729626Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4730632Z test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 -2026-09-08T01:14:34.4731576Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4731958Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4732410Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4732843Z -2026-09-08T01:14:34.4733137Z .... -2026-09-08T01:14:34.4733389Z 01:14:30.882 [error] ** (throw) :catalog_unavailable -2026-09-08T01:14:34.4734010Z test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 -2026-09-08T01:14:34.4734695Z (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 -2026-09-08T01:14:34.4735306Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 -2026-09-08T01:14:34.4736416Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4737439Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 -2026-09-08T01:14:34.4738353Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 -2026-09-08T01:14:34.4739105Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 -2026-09-08T01:14:34.4739686Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4740228Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4741224Z test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 -2026-09-08T01:14:34.4742167Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4742567Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4743031Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4743455Z -2026-09-08T01:14:34.4743647Z ... -2026-09-08T01:14:34.4743900Z 01:14:30.883 [error] ** (RuntimeError) ordinary fault -2026-09-08T01:14:34.4744852Z test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 -2026-09-08T01:14:34.4745910Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4746625Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4747163Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T01:14:34.4748119Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T01:14:34.4748943Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4750044Z test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 -2026-09-08T01:14:34.4751651Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4752100Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4752560Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4753080Z -2026-09-08T01:14:34.4753362Z ... -2026-09-08T01:14:34.4754101Z 01:14:30.885 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -2026-09-08T01:14:34.4754944Z ....... -2026-09-08T01:14:34.4755370Z 01:14:30.941 [info] beam_mcp: refused by host authorize/1: :nope -2026-09-08T01:14:34.4755875Z ... -2026-09-08T01:14:34.4756526Z 01:14:31.044 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token -2026-09-08T01:14:34.4758281Z test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4760072Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4761010Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T01:14:34.4761943Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T01:14:34.4762846Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4764026Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4765580Z test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4767109Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T01:14:34.4768022Z test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4768945Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4769331Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4769789Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4770205Z -2026-09-08T01:14:34.4770396Z -2026-09-08T01:14:34.4770625Z 01:14:31.044 [error] ** (throw) :authorize_threw -2026-09-08T01:14:34.4771531Z test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4772554Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4773123Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T01:14:34.4773700Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T01:14:34.4774270Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4774807Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4775820Z test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4777050Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T01:14:34.4777467Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T01:14:34.4778362Z test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4779282Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4779688Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4780143Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4780563Z -2026-09-08T01:14:34.4780739Z -2026-09-08T01:14:34.4780964Z 01:14:31.045 [error] ** (exit) :authorize_exited -2026-09-08T01:14:34.4781887Z test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4782913Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4783484Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T01:14:34.4784053Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T01:14:34.4784790Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4785455Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4786719Z test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4787709Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T01:14:34.4788136Z (elixir 1.18.5) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2 -2026-09-08T01:14:34.4789053Z test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 -2026-09-08T01:14:34.4789998Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4790383Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4790838Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4791256Z -2026-09-08T01:14:34.4791443Z .. -2026-09-08T01:14:34.4791706Z 01:14:31.045 [error] ** (RuntimeError) host dispatch exploded -2026-09-08T01:14:34.4792487Z test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 -2026-09-08T01:14:34.4793330Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4793805Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4794336Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T01:14:34.4794934Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T01:14:34.4795499Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4796542Z test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 -2026-09-08T01:14:34.4797308Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4797692Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4798145Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4798558Z -2026-09-08T01:14:34.4798747Z ...... -2026-09-08T01:14:34.4799296Z 01:14:31.096 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -2026-09-08T01:14:34.4799888Z .... -2026-09-08T01:14:34.4800232Z 01:14:31.098 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -2026-09-08T01:14:34.4800628Z ......... -2026-09-08T01:14:34.4800900Z 01:14:31.201 [error] ** (RuntimeError) SECRET internal detail -2026-09-08T01:14:34.4801647Z test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 -2026-09-08T01:14:34.4802434Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4802915Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4803437Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T01:14:34.4804002Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T01:14:34.4804704Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4805594Z test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 -2026-09-08T01:14:34.4806635Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4807054Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4807517Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4807935Z -2026-09-08T01:14:34.4808130Z ............... -2026-09-08T01:14:34.4808893Z 01:14:31.309 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, ...>> -2026-09-08T01:14:34.4809776Z (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 -2026-09-08T01:14:34.4810271Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 -2026-09-08T01:14:34.4810833Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4811882Z test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 -2026-09-08T01:14:34.4812837Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4813215Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4813661Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4814079Z -2026-09-08T01:14:34.4814265Z . -2026-09-08T01:14:34.4815304Z 01:14:31.310 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "***10.0.0.5/prod"} -2026-09-08T01:14:34.4815820Z ............. -2026-09-08T01:14:34.4816431Z 01:14:31.318 [error] ** (Plug.BadRequestError) could not process the request due to client error -2026-09-08T01:14:34.4817082Z test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 -2026-09-08T01:14:34.4817653Z (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 -2026-09-08T01:14:34.4818216Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 -2026-09-08T01:14:34.4818801Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4819387Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 -2026-09-08T01:14:34.4820015Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 -2026-09-08T01:14:34.4820626Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 -2026-09-08T01:14:34.4821182Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4821715Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4822707Z test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 -2026-09-08T01:14:34.4823643Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4824039Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4824659Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4825076Z -2026-09-08T01:14:34.4825381Z .. -2026-09-08T01:14:34.4825747Z 01:14:31.318 [error] ** (Plug.BadRequestError) could not process the request due to client error -2026-09-08T01:14:34.4827011Z test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 -2026-09-08T01:14:34.4828077Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4828659Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T01:14:34.4829231Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T01:14:34.4829806Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4830341Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4831315Z test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 -2026-09-08T01:14:34.4832246Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4832634Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4833090Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4833512Z -2026-09-08T01:14:34.4833705Z ................ -2026-09-08T01:14:34.4833959Z 01:14:31.338 [error] ** (throw) :thrown_secret -2026-09-08T01:14:34.4834805Z test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T01:14:34.4835713Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4836393Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4836959Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T01:14:34.4837543Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T01:14:34.4838094Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4839032Z test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T01:14:34.4839920Z (elixir 1.18.5) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3 -2026-09-08T01:14:34.4840765Z test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T01:14:34.4841591Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4841967Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4842425Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4842841Z -2026-09-08T01:14:34.4843026Z -2026-09-08T01:14:34.4843248Z 01:14:31.339 [error] ** (exit) :kaboom_secret -2026-09-08T01:14:34.4844060Z test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T01:14:34.4845255Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4845752Z (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 -2026-09-08T01:14:34.4846636Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 -2026-09-08T01:14:34.4847578Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 -2026-09-08T01:14:34.4848359Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4849866Z test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T01:14:34.4851452Z (elixir 1.18.5) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3 -2026-09-08T01:14:34.4852924Z test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 -2026-09-08T01:14:34.4854331Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2 -2026-09-08T01:14:34.4854944Z (stdlib 7.3.0.2) timer.erl:599: :timer.tc/2 -2026-09-08T01:14:34.4855677Z (ex_unit 1.18.5) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 -2026-09-08T01:14:34.4856507Z -2026-09-08T01:14:34.4856792Z .. -2026-09-08T01:14:34.4857216Z 01:14:31.445 [info] beam_mcp: refused by host authorize/1: :nope -2026-09-08T01:14:34.4857724Z -2026-09-08T01:14:34.4857996Z -2026-09-08T01:14:34.4865187Z 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) -2026-09-08T01:14:34.4896417Z ##[error] test/beam_mcp/transport/http_bandit_test.exs:300 -2026-09-08T01:14:34.4905759Z Expected truthy, got false -2026-09-08T01:14:34.4906564Z code: assert String.contains?(bytes, "HTTP/1.1 403") -2026-09-08T01:14:34.4907114Z arguments: -2026-09-08T01:14:34.4907467Z -2026-09-08T01:14:34.4907770Z # 1 -2026-09-08T01:14:34.4908099Z "" -2026-09-08T01:14:34.4908408Z -2026-09-08T01:14:34.4908703Z # 2 -2026-09-08T01:14:34.4909040Z "HTTP/1.1 403" -2026-09-08T01:14:34.4909409Z -2026-09-08T01:14:34.4909710Z stacktrace: -2026-09-08T01:14:34.4910191Z test/beam_mcp/transport/http_bandit_test.exs:315: (test) -2026-09-08T01:14:34.4910743Z -2026-09-08T01:14:34.4911022Z -2026-09-08T01:14:34.4911450Z 01:14:31.454 [info] beam_mcp: refused by host authorize/1: :nope -2026-09-08T01:14:34.4912006Z . -2026-09-08T01:14:34.4912593Z 01:14:31.460 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -2026-09-08T01:14:34.4913305Z ..... -2026-09-08T01:14:34.4913713Z 01:14:32.207 [error] ** (RuntimeError) authorize exploded -2026-09-08T01:14:34.4915394Z test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 -2026-09-08T01:14:34.4917416Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 -2026-09-08T01:14:34.4918427Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 -2026-09-08T01:14:34.4919429Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 -2026-09-08T01:14:34.4920407Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 -2026-09-08T01:14:34.4921720Z (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 -2026-09-08T01:14:34.4922772Z (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 -2026-09-08T01:14:34.4923569Z (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 -2026-09-08T01:14:34.4924398Z (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 -2026-09-08T01:14:34.4925378Z (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 -2026-09-08T01:14:34.4926580Z (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 -2026-09-08T01:14:34.4927514Z (stdlib 7.3.0.2) gen_server.erl:2424: :gen_server.try_handle_continue/3 -2026-09-08T01:14:34.4928211Z (stdlib 7.3.0.2) gen_server.erl:2291: :gen_server.loop/4 -2026-09-08T01:14:34.4928879Z (stdlib 7.3.0.2) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 -2026-09-08T01:14:34.4929412Z -2026-09-08T01:14:34.4929703Z .......... -2026-09-08T01:14:34.4930102Z Finished in 4.3 seconds (1.2s async, 3.1s sync) -2026-09-08T01:14:34.4930593Z 160 tests, 1 failure -2026-09-08T01:14:35.8755802Z credo pass -2026-09-08T01:14:38.8297071Z optional deps pass -2026-09-08T01:14:39.7455774Z docs pass -2026-09-08T01:14:39.8720126Z reuse pass (233 tracked; 58 in scope, 56 headered + 2 sidecar; excluded 173 archive + 2 licence text) -2026-09-08T01:14:39.8720704Z licence files pass -2026-09-08T01:14:39.8721009Z GATE FAILED. - -== a GREEN push-event run on this slice's fixed tree, for comparison == -$ gh run view 34222444081 --json databaseId,event,conclusion,headSha -{"conclusion":"success","databaseId":34222444081,"event":"push","headSha":"90e4e99f8bda256fc7c5a526e4fc2b3bd8ef6d25"} -2026-09-08T11:46:33.8345863Z == beam_mcp gate == -2026-09-08T11:46:34.3144528Z format pass -2026-09-08T11:47:07.6077826Z compile pass -2026-09-08T11:47:26.0753928Z test pass -2026-09-08T11:47:27.4611407Z credo pass -2026-09-08T11:47:30.2977573Z optional deps pass -2026-09-08T11:47:31.2371333Z docs pass -2026-09-08T11:47:31.3742707Z reuse pass (261 tracked; 71 in scope, 69 headered + 2 sidecar; excluded 188 archive + 2 licence text) -2026-09-08T11:47:31.3743964Z licence files pass -2026-09-08T11:47:31.3744443Z Gate OK. diff --git a/slices/006-harness-honesty/logs/gate-round1.txt b/slices/006-harness-honesty/logs/gate-round1.txt deleted file mode 100644 index 227d0d90..00000000 --- a/slices/006-harness-honesty/logs/gate-round1.txt +++ /dev/null @@ -1,65 +0,0 @@ -== the gate, 5 times, on the tree that ships == -date: 2026-09-08T02:37:06Z -HEAD: a02e5603e6a26ff91af775a0b4cd1d88943c707b -staged, so tools/ and the mutants are in git ls-files and therefore in the REUSE step's population - ----- gate run 1 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (260 tracked; 71 in scope, 69 headered + 2 sidecar; excluded 187 archive + 2 licence text) - licence files pass -Gate OK. -GATE_EXIT=0 ----- gate run 2 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (260 tracked; 71 in scope, 69 headered + 2 sidecar; excluded 187 archive + 2 licence text) - licence files pass -Gate OK. -GATE_EXIT=0 ----- gate run 3 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (260 tracked; 71 in scope, 69 headered + 2 sidecar; excluded 187 archive + 2 licence text) - licence files pass -Gate OK. -GATE_EXIT=0 ----- gate run 4 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (260 tracked; 71 in scope, 69 headered + 2 sidecar; excluded 187 archive + 2 licence text) - licence files pass -Gate OK. -GATE_EXIT=0 ----- gate run 5 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo pass - optional deps pass - docs pass - reuse pass (260 tracked; 71 in scope, 69 headered + 2 sidecar; excluded 187 archive + 2 licence text) - licence files pass -Gate OK. -GATE_EXIT=0 diff --git a/slices/006-harness-honesty/logs/green-mutation-under-load-round2.txt b/slices/006-harness-honesty/logs/green-mutation-under-load-round2.txt deleted file mode 100644 index 8981c99b..00000000 --- a/slices/006-harness-honesty/logs/green-mutation-under-load-round2.txt +++ /dev/null @@ -1,110 +0,0 @@ -== CORRECTION TO THE PROVENANCE NOTE BELOW -- ADDED 2026-09-08, AFTER IT == - -Appended, not edited. The note below stands as written; this block supersedes ONE of its claims. - -THE BIRTH-TIMESTAMP EVIDENCE IT CITES NO LONGER EXISTS, AND ADDING THAT NOTE IS WHAT DESTROYED -IT. The note argues this file is the clean re-run because the four *-round2 archives carry -births forming "an unbroken serial chain". Measured now: - - $ TZ=UTC stat -c '%wZ %yZ' - green-mutation-under-load-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc64-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-load32-round2.txt birth 13:36:56 mtime 13:36:56 - -All four share one birth, to the millisecond, and birth equals mtime -- the signature of a -wholesale rewrite. Prepending the note rewrote each file and reset the timestamp the note -offers as its proof. The archive that was cited as evidence was consumed by the act of citing -it. That is this slice's own subject, one level up. - -WHAT SURVIVES, AND ITS LIMIT. The `date:` lines below the note's end marker are the driver's own -output and are sequential -- 12:23:53Z, 12:30:22Z, 12:39:18Z, 12:48:16Z -- so the four archives -come from one serial driver run. What that CANNOT establish on its own is that no interference -overlapped its opening minutes, because the independent filesystem corroboration is gone. The -contaminated driver's files are deleted, so its 12:14:39Z births cannot be re-checked either. - -STATED RATHER THAN RESOLVED: this file is PROBABLY the clean re-run and the internal dates -support it, but the evidence originally offered for saying so does not hold, and no later -quiet-machine scoring table exists to cite instead -- `mutation-harness-anchors-round2.txt` is -EARLIER (12:06:42Z), not later. Recorded in FINDINGS.md under Round 2 rather than argued away. - -== END OF CORRECTION == - -== PROVENANCE NOTE -- ADDED BY HAND, AFTER THIS FILE WAS WRITTEN == - -This note is not command output and does not come from the run below. It was typed into the -top of this file after the run had finished and the file had been written. Everything below -the marker line that ends this note is the driver's own output, unaltered, byte for byte; not -one existing byte of it was edited to add this. - -WHY IT EXISTS. This filename was used twice. The FIRST run was interrupted: while its scoring -loop was live, a reviewer ran - - git checkout -- lib/beam_mcp/transport/http.ex - -against this worktree, plus two `mix test` alongside it. A mutant scored against unmutated code -reads as a SURVIVOR and is really a kill -- the direction of error this slice exists to remove --- and which row was corrupted is not recoverable by inspection. That run was therefore -DISCARDED IN FULL and its files DELETED rather than repaired. A 100-run rate archive from the -same driver, whose header line read `background load: 0` while busy loops were still running, -was discarded and deleted with it. - -THIS FILE IS THE CLEAN RE-RUN. IT IS NOT THE DISCARDED RUN. The evidence is the birth -timestamps of the four *-round2 archives, which form an unbroken serial chain written by one -driver, each beginning exactly when the previous one ends: - - green-mutation-under-load-round2.txt birth 2026-09-08T12:23:53Z - green-rate-mc8-idle-round2.txt birth 2026-09-08T12:30:22Z - green-rate-mc64-idle-round2.txt birth 2026-09-08T12:39:18Z - green-rate-mc8-load32-round2.txt birth 2026-09-08T12:48:16Z - -The contaminated driver's files were born 2026-09-08T12:14:39Z, and its mutation archive was -deleted at about 12:15Z -- before this re-run began. No file carrying one of the four births -above can be part of the discarded run. - -== END OF HAND-ADDED NOTE -- EVERYTHING BELOW THIS LINE IS UNTOUCHED COMMAND OUTPUT == - -background load: 32 busy loops on 32 cores -date: 2026-09-08T12:23:53Z -$ ./tools/mutate.sh score - -target: lib/beam_mcp/transport/http.ex -passes: 4 -tree: eff906ca76c6ce59d86c46018e376195ce150efd dirty=10 -M13rev | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 - exchanges repeated: 1 - failed: an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id (BeamMCP.Transport.HTTPTest) -M2always | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 - failed: an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope (BeamMCP.Transport.HTTPTest) -M2never | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 -Mc2 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 | 164 tests, 0 failures TEST_EXIT=0 -Mc3 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 - exchanges repeated: 1 - failed: an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either (BeamMCP.Transport.HTTPTest) - failed: an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued (BeamMCP.Transport.HTTPTest) -Md1 | 164 tests, 9 failures TEST_EXIT=2 | 164 tests, 9 failures TEST_EXIT=2 | 164 tests, 9 failures TEST_EXIT=2 | 164 tests, 9 failures TEST_EXIT=2 - failed: a live listener: what a refusal does to the connection a 405 ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an authorize breaking its contract ends the connection instead of draining (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an authorize refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an Origin refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an oversized body still ends the connection and says so (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - failed: the body cap a body over the cap is refused and the connection closed (BeamMCP.Transport.HTTPTest) - failed: the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) -Md2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 | 164 tests, 2 failures TEST_EXIT=2 - failed: a live listener: what a refusal does to the connection a refusal AFTER the body has been read keeps the connection (BeamMCP.Transport.HTTPBanditTest) - failed: the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) -Me1 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 | 164 tests, 1 failure TEST_EXIT=2 - failed: a header value that is not valid UTF-8 is refused, not reflected invalid UTF-8 in MCP-Protocol-Version is a 400 that reflects nothing (BeamMCP.Transport.HTTPTest) -Mr1 | 164 tests, 4 failures TEST_EXIT=2 | 164 tests, 4 failures TEST_EXIT=2 | 164 tests, 4 failures TEST_EXIT=2 | 164 tests, 4 failures TEST_EXIT=2 - exchanges repeated: 2 - failed: an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error (BeamMCP.Transport.HTTPTest) - failed: an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault (BeamMCP.Transport.HTTPTest) - failed: an x-mcp-header annotation the specification forbids is the host's fault the refusal does not depend on the caller sending the header (BeamMCP.Transport.HTTPTest) - failed: the HTTP transport's README claims a forbidden x-mcp-header annotation is the host's fault, as the README now says (BeamMCP.ReadmeClaimsTest) -Mr2 | 164 tests, 3 failures TEST_EXIT=2 | 164 tests, 3 failures TEST_EXIT=2 | 164 tests, 3 failures TEST_EXIT=2 | 164 tests, 3 failures TEST_EXIT=2 - failed: x-mcp-header values MUST be case-insensitively unique (SCR-275) a nested annotation colliding with an outer one is the same fault (BeamMCP.Transport.HTTPTest) - failed: x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it (BeamMCP.Transport.HTTPTest) - failed: x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error (BeamMCP.Transport.HTTPTest) -EXIT=0 diff --git a/slices/006-harness-honesty/logs/green-mutation-under-load.txt b/slices/006-harness-honesty/logs/green-mutation-under-load.txt deleted file mode 100644 index cc12d6a6..00000000 --- a/slices/006-harness-honesty/logs/green-mutation-under-load.txt +++ /dev/null @@ -1,41 +0,0 @@ -background load: 32 busy loops on 32 cores -date: 2026-09-08T01:56:36Z -$ ./tools/mutate.sh score - -target: lib/beam_mcp/transport/http.ex -passes: 4 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=4 -M13rev | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 - failed: an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id (BeamMCP.Transport.HTTPTest) -M2always | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 - failed: an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope (BeamMCP.Transport.HTTPTest) -M2never | 162 tests, 0 failures TEST_EXIT=0 | 162 tests, 0 failures TEST_EXIT=0 | 162 tests, 0 failures TEST_EXIT=0 | 162 tests, 0 failures TEST_EXIT=0 -Mc2 | 162 tests, 0 failures TEST_EXIT=0 | 162 tests, 0 failures TEST_EXIT=0 | 162 tests, 0 failures TEST_EXIT=0 | 162 tests, 0 failures TEST_EXIT=0 -Mc3 | 162 tests, 2 failures TEST_EXIT=2 | 162 tests, 2 failures TEST_EXIT=2 | 162 tests, 2 failures TEST_EXIT=2 | 162 tests, 2 failures TEST_EXIT=2 - failed: an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either (BeamMCP.Transport.HTTPTest) - failed: an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued (BeamMCP.Transport.HTTPTest) -Md1 | 162 tests, 9 failures TEST_EXIT=2 | 162 tests, 9 failures TEST_EXIT=2 | 162 tests, 9 failures TEST_EXIT=2 | 162 tests, 9 failures TEST_EXIT=2 - failed: a live listener: what a refusal does to the connection a 405 ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an authorize breaking its contract ends the connection instead of draining (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an authorize refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an Origin refusal ends the connection instead of draining the body it refused (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection an oversized body still ends the connection and says so (BeamMCP.Transport.HTTPBanditTest) - failed: a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - failed: the body cap a body over the cap is refused and the connection closed (BeamMCP.Transport.HTTPTest) - failed: the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) -Md2 | 162 tests, 2 failures TEST_EXIT=2 | 162 tests, 2 failures TEST_EXIT=2 | 162 tests, 2 failures TEST_EXIT=2 | 162 tests, 2 failures TEST_EXIT=2 - failed: a live listener: what a refusal does to the connection a refusal AFTER the body has been read keeps the connection (BeamMCP.Transport.HTTPBanditTest) - failed: the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) -Me1 | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 | 162 tests, 1 failure TEST_EXIT=2 - failed: a header value that is not valid UTF-8 is refused, not reflected invalid UTF-8 in MCP-Protocol-Version is a 400 that reflects nothing (BeamMCP.Transport.HTTPTest) -Mr1 | 162 tests, 4 failures TEST_EXIT=2 | 162 tests, 4 failures TEST_EXIT=2 | 162 tests, 4 failures TEST_EXIT=2 | 162 tests, 4 failures TEST_EXIT=2 - failed: an x-mcp-header annotation the specification forbids is the host's fault an annotated `number` property is answered as a host fault, not as the caller's error (BeamMCP.Transport.HTTPTest) - failed: an x-mcp-header annotation the specification forbids is the host's fault an annotated `object` property is the same fault (BeamMCP.Transport.HTTPTest) - failed: an x-mcp-header annotation the specification forbids is the host's fault the refusal does not depend on the caller sending the header (BeamMCP.Transport.HTTPTest) - failed: the HTTP transport's README claims a forbidden x-mcp-header annotation is the host's fault, as the README now says (BeamMCP.ReadmeClaimsTest) -Mr2 | 162 tests, 3 failures TEST_EXIT=2 | 162 tests, 3 failures TEST_EXIT=2 | 162 tests, 3 failures TEST_EXIT=2 | 162 tests, 3 failures TEST_EXIT=2 - failed: x-mcp-header values MUST be case-insensitively unique (SCR-275) a nested annotation colliding with an outer one is the same fault (BeamMCP.Transport.HTTPTest) - failed: x-mcp-header values MUST be case-insensitively unique (SCR-275) the collision is refused however the caller writes the header, or omits it (BeamMCP.Transport.HTTPTest) - failed: x-mcp-header values MUST be case-insensitively unique (SCR-275) two properties whose annotations collide are a host fault, not a caller error (BeamMCP.Transport.HTTPTest) -EXIT=0 diff --git a/slices/006-harness-honesty/logs/green-rate-mc64-idle-round2.txt b/slices/006-harness-honesty/logs/green-rate-mc64-idle-round2.txt deleted file mode 100644 index e8581433..00000000 --- a/slices/006-harness-honesty/logs/green-rate-mc64-idle-round2.txt +++ /dev/null @@ -1,25184 +0,0 @@ -== CORRECTION TO THE PROVENANCE NOTE BELOW -- ADDED 2026-09-08, AFTER IT == - -Appended, not edited. The note below stands as written; this block supersedes ONE of its claims. - -THE BIRTH-TIMESTAMP EVIDENCE IT CITES NO LONGER EXISTS, AND ADDING THAT NOTE IS WHAT DESTROYED -IT. The note argues this file is the clean re-run because the four *-round2 archives carry -births forming "an unbroken serial chain". Measured now: - - $ TZ=UTC stat -c '%wZ %yZ' - green-mutation-under-load-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc64-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-load32-round2.txt birth 13:36:56 mtime 13:36:56 - -All four share one birth, to the millisecond, and birth equals mtime -- the signature of a -wholesale rewrite. Prepending the note rewrote each file and reset the timestamp the note -offers as its proof. The archive that was cited as evidence was consumed by the act of citing -it. That is this slice's own subject, one level up. - -WHAT SURVIVES, AND ITS LIMIT. The `date:` lines below the note's end marker are the driver's own -output and are sequential -- 12:23:53Z, 12:30:22Z, 12:39:18Z, 12:48:16Z -- so the four archives -come from one serial driver run. What that CANNOT establish on its own is that no interference -overlapped its opening minutes, because the independent filesystem corroboration is gone. The -contaminated driver's files are deleted, so its 12:14:39Z births cannot be re-checked either. - -STATED RATHER THAN RESOLVED: this file is PROBABLY the clean re-run and the internal dates -support it, but the evidence originally offered for saying so does not hold, and no later -quiet-machine scoring table exists to cite instead -- `mutation-harness-anchors-round2.txt` is -EARLIER (12:06:42Z), not later. Recorded in FINDINGS.md under Round 2 rather than argued away. - -== END OF CORRECTION == - -== PROVENANCE NOTE -- ADDED BY HAND, AFTER THIS FILE WAS WRITTEN == - -This note is not command output and does not come from the run below. It was typed into the -top of this file after the run had finished and the file had been written. Everything below -the marker line that ends this note is the driver's own output, unaltered, byte for byte; not -one existing byte of it was edited to add this. - -WHY IT EXISTS. This filename was used twice. The FIRST run was interrupted: while its scoring -loop was live, a reviewer ran - - git checkout -- lib/beam_mcp/transport/http.ex - -against this worktree, plus two `mix test` alongside it. A mutant scored against unmutated code -reads as a SURVIVOR and is really a kill -- the direction of error this slice exists to remove --- and which row was corrupted is not recoverable by inspection. That run was therefore -DISCARDED IN FULL and its files DELETED rather than repaired. A 100-run rate archive from the -same driver, whose header line read `background load: 0` while busy loops were still running, -was discarded and deleted with it. - -THIS FILE IS THE CLEAN RE-RUN. IT IS NOT THE DISCARDED RUN. The evidence is the birth -timestamps of the four *-round2 archives, which form an unbroken serial chain written by one -driver, each beginning exactly when the previous one ends: - - green-mutation-under-load-round2.txt birth 2026-09-08T12:23:53Z - green-rate-mc8-idle-round2.txt birth 2026-09-08T12:30:22Z - green-rate-mc64-idle-round2.txt birth 2026-09-08T12:39:18Z - green-rate-mc8-load32-round2.txt birth 2026-09-08T12:48:16Z - -The contaminated driver's files were born 2026-09-08T12:14:39Z, and its mutation archive was -deleted at about 12:15Z -- before this re-run began. No file carrying one of the four births -above can be part of the discarded run. - -AND THE `background load: 0` HEADER LINE BELOW IS TRUTHFUL. It is worth saying so explicitly, -because it is the same line the deleted 12:14:39Z archive carried FALSELY. This run is inside -the 12:30-12:48Z window of the chain above, which is after every busy loop from the loaded -probes had been killed. The deleted archive printed that line while those loops were still -running; this one did not. - -== END OF HAND-ADDED NOTE -- EVERYTHING BELOW THIS LINE IS UNTOUCHED COMMAND OUTPUT == - -== green-rate-mc64-idle-round2 == -command: mix test --max-cases 64 (x100 consecutive runs) -background load: 0 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: eff906ca76c6ce59d86c46018e376195ce150efd dirty=11 -date: 2026-09-08T12:39:18Z - ----- run 1 ---- -Running ExUnit with seed: 1200, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:39:19.230 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:39:19.429 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:19.432 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:19.442 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -08:39:19.562 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:19.562 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:39:19.615 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:19.667 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:39:19.719 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:19.771 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:39:19.828 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:19.832 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:19.833 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:19.840 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:19.841 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:39:19.996 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:39:19.996 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:19.997 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:19.997 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:19.997 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:39:21.736 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:21.739 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:39:22.449 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:39:23.930 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 428913, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:39:24.601 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:39:24.842 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:39:24.948 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:39:24.955 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:24.955 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:25.013 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:25.071 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:39:25.072 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:39:25.176 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:39:25.177 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:25.228 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:39:25.282 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:25.287 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:25.287 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:39:25.292 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:25.292 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:25.292 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:25.292 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:39:25.343 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:39:25.344 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:39:26.398 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:39:26.458 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:39:27.890 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:39:27.894 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 811823, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:39:30.067 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:39:30.277 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:30.280 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:39:30.280 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:39:30.284 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:39:30.392 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:39:30.393 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:30.393 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:30.445 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:39:30.502 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:30.503 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:30.503 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:30.503 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:30.507 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:30.561 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:30.561 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:30.561 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:30.562 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:39:30.569 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -08:39:30.675 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -08:39:31.813 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:39:33.239 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:33.243 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:39:34.654 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 177543, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:39:35.392 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:39:35.593 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:39:35.598 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:39:35.614 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:39:35.615 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:35.626 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:39:35.783 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:39:35.785 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:35.785 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:39:35.799 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:35.850 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:39:35.957 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:35.957 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:36.009 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:39:36.016 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:36.017 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:36.017 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:36.017 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:39:36.018 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:39:36.122 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:39:37.186 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:39:39.375 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:39:40.110 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:39:40.114 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 616437, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:39:40.845 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:39:41.026 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:41.026 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:41.026 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:41.027 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:41.082 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:41.084 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:39:41.085 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:39:41.139 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:39:41.244 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:41.248 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:39:41.249 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:41.254 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:39:41.421 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:39:41.479 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:41.480 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:41.480 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:41.480 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:39:41.535 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:41.541 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:39:43.971 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:39:43.975 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:39:43.979 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:39:45.483 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 995676, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:39:46.169 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -08:39:46.471 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:46.473 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:39:46.474 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:46.475 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:46.475 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:46.475 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:46.527 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:39:46.528 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:39:46.579 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:46.582 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:46.583 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:39:46.642 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:46.649 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:39:46.650 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:46.650 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:46.651 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:39:46.760 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:46.817 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:39:46.921 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -08:39:48.632 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:39:48.634 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:39:50.756 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:39:50.835 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 339839, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:39:51.582 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:39:51.754 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:39:51.769 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:39:51.874 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -08:39:51.936 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:51.936 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:51.937 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:39:51.997 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:51.998 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:51.999 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:39:52.053 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:52.053 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:39:52.054 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:52.105 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:52.163 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:52.163 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:39:52.214 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:52.215 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:52.215 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:39:52.317 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:39:53.310 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -........ -08:39:55.443 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:39:56.157 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:56.237 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 740737, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:39:56.930 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:39:57.146 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:39:57.200 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:57.201 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:57.201 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:57.201 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:39:57.313 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:39:57.313 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:39:57.366 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:39:57.431 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:57.483 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:39:57.545 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:57.597 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:57.598 [info] beam_mcp: refused by host authorize/1: :nope -.................. -08:39:57.704 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:57.704 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:57.704 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -08:39:57.710 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:39:57.711 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:57.711 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:00.162 [info] beam_mcp: refused by host authorize/1: :nope -... -08:40:00.882 [info] beam_mcp: refused by host authorize/1: :nope -... -08:40:00.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:40:00.904 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 116741, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:40:02.317 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -08:40:02.517 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:02.517 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:02.528 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:40:02.585 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:40:02.638 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:02.638 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:02.639 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:40:02.640 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:02.640 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:02.697 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:40:02.856 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:02.862 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:40:02.915 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:02.921 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:02.925 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:03.031 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:03.032 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:40:03.032 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:40:03.084 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:40:04.066 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:04.072 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:40:04.142 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:40:04.147 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -........ -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 486846, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -08:40:07.725 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -08:40:07.968 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:07.974 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:07.975 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:07.976 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:40:08.029 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:08.133 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:40:08.190 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:40:08.293 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:08.293 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:08.293 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:40:08.352 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:40:08.354 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:40:08.358 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:08.359 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:40:08.411 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:40:08.420 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:40:08.420 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:08.420 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:08.421 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:09.473 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:40:12.307 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:40:12.389 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:12.394 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 886785, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:40:13.049 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -08:40:13.410 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:13.414 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:13.414 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:13.415 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:13.415 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:40:13.468 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:13.468 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:40:13.519 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:40:13.520 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:13.575 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:40:13.633 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:13.636 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:13.637 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:40:13.637 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:40:13.638 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:13.645 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:40:13.646 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:13.646 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -08:40:13.861 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:14.811 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:40:16.928 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:40:16.932 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:40:17.724 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 230641, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:40:18.397 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -08:40:18.694 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:40:18.695 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:18.695 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:18.695 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:18.749 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -08:40:18.806 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:18.806 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:40:18.861 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:40:18.862 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:40:18.866 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:18.867 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:40:18.868 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:18.868 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:18.868 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:40:18.925 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:18.977 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:18.977 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:40:18.978 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:40:18.984 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:40:20.171 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -08:40:22.296 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:40:22.299 [info] beam_mcp: refused by host authorize/1: :nope -... -08:40:22.391 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 589669, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:40:23.770 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:40:23.992 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:40:24.105 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:24.105 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:40:24.164 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:24.165 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:40:24.165 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:24.165 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:24.168 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:24.168 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:24.169 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:40:24.170 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:24.170 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:24.170 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:40:24.274 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:40:24.326 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:24.328 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:40:24.395 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:24.499 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:40:24.505 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:40:25.496 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:40:27.703 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:27.708 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:27.712 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 928082, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:40:29.144 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -08:40:29.361 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:40:29.416 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:29.416 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:40:29.470 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:29.471 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:40:29.525 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -08:40:29.640 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:29.640 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:29.640 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:29.698 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:40:29.756 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:29.814 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:40:29.815 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:29.815 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:40:29.871 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:29.923 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:40:29.924 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:29.925 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:29.925 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:32.346 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:40:32.431 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:40:33.871 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:40:33.876 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 374496, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:40:34.565 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:40:34.790 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:40:34.899 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:40:34.904 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:40:34.961 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:34.962 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:40:35.016 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:35.016 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:40:35.019 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:40:35.024 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:35.076 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:40:35.129 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:35.129 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:35.129 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:35.129 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:40:35.129 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:40:35.182 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:35.183 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:40:35.236 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:40:35.345 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:40:37.825 [info] beam_mcp: refused by host authorize/1: :nope -... -08:40:38.539 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:40:38.543 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:40:38.550 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 774482, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -08:40:39.982 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -08:40:40.193 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:40.197 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:40:40.204 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:40.204 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:40.360 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:40:40.412 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:40.412 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:40.413 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:40.416 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:40:40.417 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:40.417 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:40.417 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:40:40.419 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:40:40.471 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:40:40.576 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:40:40.591 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:40.594 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:40.599 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:40:40.702 [info] beam_mcp: refused by host authorize/1: :nope -.................... -08:40:42.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:40:43.961 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:43.966 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:43.970 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 152787, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:40:45.384 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:40:45.555 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:40:45.564 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:45.572 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:40:45.580 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:40:45.638 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:40:45.690 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:45.691 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:45.691 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:45.691 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:45.691 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:40:45.799 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:45.799 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:40:45.858 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:40:45.865 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:40:45.974 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:45.974 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:40:46.129 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:46.129 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:46.129 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:40:47.122 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:40:47.833 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:40:47.836 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -08:40:50.043 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 553355, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:40:50.785 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:40:50.963 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:40:51.024 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:51.028 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:51.029 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:51.082 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:51.083 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:51.083 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:51.139 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:51.139 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:40:51.251 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:51.252 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:51.252 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:51.252 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:51.254 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:40:51.259 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:51.259 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:40:51.259 [info] beam_mcp: refused by host authorize/1: :nope -................. -08:40:51.416 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:40:51.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........................... -08:40:53.249 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:53.253 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:40:53.256 [info] beam_mcp: refused by host authorize/1: :nope -. -08:40:53.259 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 867544, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:40:56.112 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:40:56.346 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:40:56.354 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:56.354 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:40:56.357 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:56.358 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:40:56.362 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:40:56.425 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:40:56.425 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:40:56.585 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:56.586 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:56.586 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:40:56.586 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:40:56.639 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:40:56.697 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:40:56.697 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:56.698 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:40:56.698 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:40:56.751 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:40:56.751 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................... -08:40:58.613 [info] beam_mcp: refused by host authorize/1: :nope -... -08:41:00.022 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:00.027 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:41:00.035 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 262157, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:41:01.488 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:41:01.654 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:41:01.710 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:41:01.815 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:01.815 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:41:01.874 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:41:01.927 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:01.928 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:01.928 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:01.928 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:41:01.934 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:01.939 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:01.943 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:01.995 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:02.001 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:02.001 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:02.002 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:02.054 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:02.054 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:41:02.219 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:41:04.581 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:41:05.398 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:05.403 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:41:05.408 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 607133, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:41:06.820 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:41:07.012 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:41:07.017 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:41:07.073 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:41:07.126 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:07.132 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:07.139 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:07.139 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:41:07.196 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:41:07.202 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:07.203 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:07.203 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:07.204 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:41:07.256 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:07.256 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:07.257 [info] beam_mcp: refused by host authorize/1: :nope -.............. -08:41:07.468 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:41:07.519 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:41:07.573 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:07.578 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:41:08.648 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:41:09.369 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:41:09.372 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:41:10.088 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 985614, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:41:12.187 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -08:41:12.393 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:41:12.412 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................ -08:41:12.636 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:41:12.641 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:12.694 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:12.696 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:12.696 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:12.697 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:12.697 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:12.701 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:41:12.808 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:41:12.808 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:41:12.809 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:12.861 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:12.861 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:41:12.917 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:41:12.970 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:12.970 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:12.978 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:13.959 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:41:13.964 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:41:14.676 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:41:16.851 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 286358, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:41:17.500 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:41:17.740 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:41:17.743 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:17.744 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:17.744 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:17.744 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:17.799 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:17.799 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:17.800 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:17.800 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:41:17.852 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:41:17.857 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:41:17.921 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:17.922 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:17.926 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:41:18.039 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:18.094 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:41:18.095 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:18.146 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:41:18.197 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:41:20.074 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:20.082 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:41:20.791 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:41:20.796 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 641010, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:41:22.837 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:41:23.044 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:41:23.108 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:41:23.110 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:41:23.165 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:41:23.168 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:23.226 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:23.227 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:23.227 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:23.227 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:41:23.227 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:23.233 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:23.233 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:23.233 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:23.233 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:41:23.444 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:41:23.496 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:23.548 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:23.554 [info] beam_mcp: refused by host authorize/1: :nope -... -08:41:23.606 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -08:41:25.350 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:25.354 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:41:27.476 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:41:27.480 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 881922, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:41:28.082 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:41:28.339 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:28.339 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:28.359 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:28.411 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:28.417 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:41:28.471 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:28.472 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:28.472 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:28.472 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:28.472 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:41:28.528 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:41:28.633 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:28.639 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:28.639 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:41:28.693 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:41:28.800 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:28.801 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:41:28.853 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:41:28.905 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -08:41:32.781 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:32.790 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:41:32.797 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:41:32.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 219256, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:41:33.372 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -08:41:33.747 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:33.751 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:41:33.751 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:33.752 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:41:33.854 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:33.854 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:41:33.965 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:41:34.068 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:41:34.126 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:34.179 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:41:34.184 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:34.185 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:34.185 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:34.185 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:34.185 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:34.185 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:41:34.237 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:41:34.242 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:41:34.247 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:41:36.731 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:36.738 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:41:37.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:41:37.466 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.9 seconds (1.0s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 592354, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:41:38.792 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:41:39.097 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:39.149 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:39.152 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:41:39.210 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:39.210 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:39.210 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -08:41:39.321 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:41:39.373 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -08:41:39.426 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:39.428 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:39.435 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:39.435 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:39.435 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:39.435 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:39.436 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:41:39.497 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:39.497 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:41:39.498 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:41:39.550 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:41:41.386 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:41:43.518 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:41:43.523 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:41:43.526 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 926082, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:41:44.141 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:41:44.368 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:41:44.421 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:44.425 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:44.480 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:41:44.482 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:41:44.483 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:41:44.540 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:41:44.705 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:44.712 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:44.712 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:41:44.765 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:44.766 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:44.766 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:44.766 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:44.766 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -08:41:44.871 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:44.872 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:41:44.872 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:41:44.878 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:41:46.631 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:41:48.044 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:41:48.757 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:41:48.834 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 349490, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:41:49.519 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:41:49.739 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:41:49.798 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:49.798 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:49.799 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:41:49.805 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:41:49.807 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:49.807 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:49.807 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:41:49.859 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:49.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:41:49.967 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:41:50.078 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:50.078 [info] beam_mcp: refused by host authorize/1: :nope -... -08:41:50.136 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:50.140 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:50.140 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:41:50.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:41:50.248 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:41:50.305 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -08:41:52.022 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:41:52.080 [info] beam_mcp: refused by host authorize/1: :nope -. -08:41:52.084 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:41:52.798 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 705854, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:41:54.929 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:41:55.114 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:41:55.114 [info] beam_mcp: refused by host authorize/1: :nope -... -08:41:55.220 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:41:55.221 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:55.221 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:55.221 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:41:55.280 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:55.280 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:55.287 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:55.288 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -08:41:55.498 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:41:55.498 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:41:55.559 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:41:55.562 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:41:55.674 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:41:55.678 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:55.679 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:41:55.679 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:41:55.683 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:41:56.636 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:41:57.400 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:41:58.137 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:41:58.142 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 37174, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:42:00.258 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -08:42:00.440 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:00.451 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:42:00.452 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:00.453 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:42:00.512 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:00.512 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:00.512 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:00.513 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:00.514 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:00.517 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:00.517 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:00.517 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:42:00.518 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:00.518 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:00.524 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:00.583 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:00.585 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................................................. -08:42:00.858 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:42:01.014 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:42:02.000 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:42:03.484 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:03.491 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:42:03.500 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 409784, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:42:05.662 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:42:05.897 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:42:05.955 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:06.013 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:06.013 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:06.018 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:06.022 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:06.027 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:06.028 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:42:06.028 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:42:06.029 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:06.029 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:06.029 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:42:06.083 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:06.134 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:06.136 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:42:06.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:42:06.346 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:42:06.347 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:06.407 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:42:08.121 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:42:09.608 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:42:10.335 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:42:10.339 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 831344, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:42:11.007 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:42:11.245 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:42:11.245 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:42:11.298 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:11.306 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:11.310 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:42:11.421 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:11.473 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:42:11.577 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:11.630 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:11.634 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:42:11.739 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:42:11.740 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:11.740 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:11.740 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:11.741 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:11.745 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:42:11.750 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:11.750 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:42:11.758 [info] beam_mcp: refused by host authorize/1: :nope -............... -08:42:13.512 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:42:14.301 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:14.307 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:42:15.727 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 212992, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:42:16.450 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -08:42:16.648 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:16.648 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:16.648 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:42:16.715 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:16.715 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:16.716 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:16.717 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:16.718 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:42:16.722 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:16.722 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:42:16.834 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:16.836 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:42:16.838 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:16.838 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:16.897 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:16.956 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:42:17.062 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:17.062 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:42:17.164 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -08:42:18.252 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:18.258 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:42:20.446 [info] beam_mcp: refused by host authorize/1: :nope -... -08:42:21.163 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 657849, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:42:21.836 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:42:22.056 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:42:22.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:42:22.177 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:42:22.232 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:22.233 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:22.233 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:22.286 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:22.293 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:22.293 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:42:22.403 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:42:22.508 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:42:22.561 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:22.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:42:22.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:42:22.564 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:22.564 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:42:22.616 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:42:22.623 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:22.625 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:42:23.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:42:24.383 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:42:24.443 [info] beam_mcp: refused by host authorize/1: :nope -. -08:42:24.447 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 50002, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:42:27.277 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:42:27.531 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:42:27.586 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:42:27.588 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:27.589 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:42:27.643 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:42:27.748 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:27.755 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:42:27.915 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:27.920 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:27.920 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:27.921 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:27.921 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:27.921 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:27.922 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:27.922 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:42:27.927 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:27.928 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:27.928 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:27.928 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................... -08:42:29.088 [info] beam_mcp: refused by host authorize/1: :nope -. -08:42:29.093 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:29.096 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:42:29.101 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -........ -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 442652, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:42:32.630 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:42:32.922 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:42:32.978 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:32.979 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:32.979 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:32.979 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:32.979 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:32.979 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:33.033 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:33.135 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:33.192 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:42:33.193 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:33.193 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:42:33.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -08:42:33.353 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:33.407 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:42:33.408 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:42:33.424 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:33.429 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:33.430 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:42:36.547 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:42:36.551 [info] beam_mcp: refused by host authorize/1: :nope -. -08:42:36.628 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:42:37.344 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 851779, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:42:38.038 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:42:38.269 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:38.269 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:42:38.376 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:38.376 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:42:38.432 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:42:38.436 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:38.438 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:42:38.492 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:38.493 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:38.546 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:38.547 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:42:38.547 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:42:38.707 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:38.712 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:38.713 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:42:38.717 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:42:38.830 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:38.830 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:38.830 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:42:39.805 [info] beam_mcp: refused by host authorize/1: :nope -... -08:42:40.516 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:42:40.519 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:42:41.302 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 198338, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:42:43.451 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:42:43.656 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -08:42:43.656 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:43.716 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:43.716 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:43.716 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:43.716 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:43.722 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................................... -08:42:43.790 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:43.849 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:43.849 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:42:43.849 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:42:44.009 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:42:44.013 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:44.013 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:42:44.065 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:44.066 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:44.066 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:42:44.066 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:42:44.170 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:42:45.119 [info] beam_mcp: refused by host authorize/1: :nope -. -08:42:45.124 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -08:42:48.020 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:42:48.038 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 542329, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:42:48.754 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:42:48.992 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:48.995 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:42:48.996 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:42:49.101 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:42:49.208 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:42:49.209 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:42:49.209 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:49.210 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:49.210 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:49.210 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:49.210 [info] beam_mcp: refused by host authorize/1: :nope -. -08:42:49.263 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:42:49.264 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:42:49.271 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:49.374 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:49.374 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:42:49.382 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:49.388 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:42:49.499 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:42:50.547 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:42:51.266 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:42:52.690 [info] beam_mcp: refused by host authorize/1: :nope -. -08:42:52.694 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 41 ---- -Running ExUnit with seed: 895778, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:42:54.079 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:42:54.317 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:42:54.425 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:54.430 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:42:54.430 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:42:54.437 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:42:54.437 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:42:54.547 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:54.547 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:54.547 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:42:54.651 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:42:54.706 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:42:54.706 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:42:54.706 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:54.707 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:54.707 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:42:54.708 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:42:54.768 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:54.769 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:42:54.822 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -08:42:55.894 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:42:57.320 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:42:58.749 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:42:58.754 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 42 ---- -Running ExUnit with seed: 239642, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:42:59.485 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -08:42:59.640 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:42:59.641 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:42:59.655 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:42:59.655 [info] beam_mcp: refused by host authorize/1: :nope -. -08:42:59.706 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:42:59.764 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:42:59.777 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:42:59.888 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:42:59.892 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:42:59.892 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:43:00.005 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:00.005 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:00.006 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:00.006 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:00.007 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:00.007 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:43:00.007 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:00.109 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:43:00.110 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:43:01.140 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:43:01.146 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:43:01.872 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:43:04.063 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 43 ---- -Running ExUnit with seed: 550866, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:43:04.778 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:43:04.946 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:43:05.003 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:05.003 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:05.003 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:43:05.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:43:05.014 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:43:05.014 [info] beam_mcp: refused by host authorize/1: :nope -. -08:43:05.066 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:05.066 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:05.068 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:43:05.075 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:05.126 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:43:05.187 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:43:05.248 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:05.248 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:05.249 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:05.352 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:43:05.461 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:43:05.522 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:43:06.527 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:43:06.533 [info] beam_mcp: refused by host authorize/1: :nope -. -08:43:06.535 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:43:07.297 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 44 ---- -Running ExUnit with seed: 921142, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:43:10.124 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -08:43:10.341 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:10.342 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:10.342 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:10.344 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................................. -08:43:10.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:43:10.623 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:43:10.728 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:10.729 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:10.729 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:10.729 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:10.730 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:43:10.792 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:10.792 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:10.796 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:10.796 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:43:10.797 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:43:10.850 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:10.854 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:10.906 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:43:13.381 [info] beam_mcp: refused by host authorize/1: :nope -... -08:43:13.390 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:43:14.809 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:43:14.815 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 45 ---- -Running ExUnit with seed: 327132, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:43:15.539 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:43:15.761 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:43:15.766 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:15.767 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:15.767 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:15.878 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:43:15.983 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:43:16.037 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:43:16.091 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:16.091 [info] beam_mcp: refused by host authorize/1: :nope -... -08:43:16.195 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:16.256 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:16.256 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:16.257 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:43:16.257 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:16.264 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:16.317 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:43:16.317 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:16.325 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:16.328 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:43:17.380 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:43:18.091 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:43:18.806 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:43:18.825 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 46 ---- -Running ExUnit with seed: 727776, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................... -08:43:20.996 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -08:43:21.190 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:43:21.349 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:21.350 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:21.351 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:21.351 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:21.352 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:43:21.352 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:21.353 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:21.353 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:21.353 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:43:21.357 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:43:21.414 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:21.414 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:43:21.415 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:43:21.418 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:43:21.470 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:21.476 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:43:21.535 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:43:21.593 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:43:22.777 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:43:24.214 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:43:25.621 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:43:25.625 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 47 ---- -Running ExUnit with seed: 120791, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:43:26.390 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:43:26.593 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:26.595 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:26.597 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:26.597 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:26.597 [info] beam_mcp: refused by host authorize/1: :nope -. -08:43:26.654 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:26.708 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:43:26.761 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:43:26.767 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:26.769 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:43:26.769 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:43:26.834 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:26.888 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:26.888 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:26.888 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:26.889 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:43:27.055 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:43:27.056 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:43:27.116 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:43:28.165 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:43:29.576 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:43:29.595 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:43:31.021 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 48 ---- -Running ExUnit with seed: 513545, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:43:31.695 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:43:31.930 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:43:32.033 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:43:32.146 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:43:32.148 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:32.151 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:43:32.153 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:43:32.154 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:32.154 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:32.154 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:32.154 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:32.155 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:32.155 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:32.207 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:43:32.260 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:43:32.366 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:43:32.470 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:32.481 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:32.488 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:32.492 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:43:35.585 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:43:36.374 [info] beam_mcp: refused by host authorize/1: :nope -. -08:43:36.379 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:43:36.397 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 49 ---- -Running ExUnit with seed: 882824, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:43:37.098 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:43:37.276 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:43:37.276 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:37.276 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:37.289 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:37.294 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:43:37.295 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:37.295 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:37.404 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:37.405 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:37.405 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:37.465 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:43:37.478 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:37.536 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:37.537 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:43:37.693 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:43:37.745 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:43:37.850 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:37.853 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:43:37.858 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -08:43:39.533 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:43:39.588 [info] beam_mcp: refused by host authorize/1: :nope -. -08:43:39.592 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:43:41.706 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 50 ---- -Running ExUnit with seed: 200830, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:43:42.411 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................................. -08:43:42.688 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:43:42.797 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:42.799 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:42.852 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:42.852 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:43:42.856 [info] beam_mcp: refused by host authorize/1: :nope -. -08:43:42.909 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:42.913 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:43:42.915 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:42.915 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:43:43.020 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:43:43.026 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:43.027 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:43:43.087 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:43.088 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:43.088 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:43.088 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:43:43.154 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:43.207 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:43:44.218 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:43:44.228 [info] beam_mcp: refused by host authorize/1: :nope -... -08:43:46.418 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:43:47.146 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 51 ---- -Running ExUnit with seed: 651859, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:43:47.836 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -08:43:48.051 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:43:48.265 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:48.272 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:48.272 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:48.272 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:48.273 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:48.273 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:43:48.379 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:43:48.381 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:43:48.392 [info] beam_mcp: refused by host authorize/1: :nope -... -08:43:48.454 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:43:48.614 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:48.615 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:48.615 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:48.616 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:48.616 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:48.622 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:43:48.625 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:48.625 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:43:49.631 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:43:49.637 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:43:49.640 [info] beam_mcp: refused by host authorize/1: :nope -. -08:43:49.695 [info] beam_mcp: refused by host authorize/1: :nope -......... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 52 ---- -Running ExUnit with seed: 24710, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:43:53.198 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:43:53.408 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:53.412 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:53.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:43:53.523 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:53.524 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:43:53.633 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:53.685 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:53.685 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:53.685 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:53.686 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:53.687 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:43:53.689 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:43:53.747 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:53.748 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:43:53.752 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:43:53.753 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:43:53.810 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:43:53.864 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:43:53.969 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:43:54.977 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:43:56.402 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:43:57.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:43:57.817 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 53 ---- -Running ExUnit with seed: 301118, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:43:58.560 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -08:43:58.816 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:58.817 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:43:58.818 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:43:58.824 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:43:58.824 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:43:58.885 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:58.889 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:43:58.942 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:58.942 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:43:58.943 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:43:58.944 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:43:58.946 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:43:58.947 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:43:58.953 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:43:59.006 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:43:59.059 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:43:59.060 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:59.060 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:43:59.060 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................ -08:44:00.284 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:44:02.403 [info] beam_mcp: refused by host authorize/1: :nope -. -08:44:02.407 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:44:02.489 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 54 ---- -Running ExUnit with seed: 709920, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:44:03.882 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:44:04.141 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:44:04.313 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:04.317 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:04.317 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:04.317 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:04.317 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:04.319 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:44:04.320 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:04.320 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:04.324 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:44:04.324 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:44:04.379 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:04.379 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:44:04.379 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:44:04.490 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:04.490 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:44:04.600 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:04.600 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:04.600 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....................... -08:44:06.465 [info] beam_mcp: refused by host authorize/1: :nope -. -08:44:06.471 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:44:07.887 [info] beam_mcp: refused by host authorize/1: :nope -. -08:44:07.891 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 55 ---- -Running ExUnit with seed: 101218, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:44:09.289 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:44:09.511 [info] beam_mcp: refused by host authorize/1: :nope -. -08:44:09.570 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:44:09.571 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:09.574 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:44:09.637 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:09.637 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:44:09.796 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:44:09.849 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:09.849 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:09.905 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:44:09.959 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:09.959 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:09.964 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:10.017 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:10.018 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:10.018 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:44:10.028 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:10.029 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:44:10.081 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:44:11.044 [info] beam_mcp: refused by host authorize/1: :nope -... -08:44:11.104 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:44:11.109 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:44:12.529 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 56 ---- -Running ExUnit with seed: 440466, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -08:44:14.670 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:44:14.920 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:44:14.934 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:14.936 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:44:14.993 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:44:14.999 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:44:15.053 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:44:15.105 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:15.106 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:15.106 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:15.106 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:15.107 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:44:15.107 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:44:15.161 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:44:15.215 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:15.215 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:15.274 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:15.277 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:15.277 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:44:15.328 [info] beam_mcp: refused by host authorize/1: :nope -........... -08:44:16.446 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -08:44:19.272 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:44:19.357 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:44:19.382 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 57 ---- -Running ExUnit with seed: 881134, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:44:20.064 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -08:44:20.288 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:44:20.305 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:20.310 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:20.310 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -08:44:20.471 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:44:20.475 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:20.528 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:20.528 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:44:20.534 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:20.534 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:20.534 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:20.535 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:44:20.743 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:44:20.802 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:20.803 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:44:20.803 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:20.804 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:20.804 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:44:20.805 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:44:23.246 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:44:23.331 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:44:23.337 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:44:24.744 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 58 ---- -Running ExUnit with seed: 232385, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:44:25.475 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:44:25.683 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:25.684 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:25.684 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:44:25.741 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:25.742 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:44:25.846 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:25.846 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:25.852 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:25.853 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:25.853 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:25.857 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:25.859 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -08:44:25.867 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:44:25.919 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:25.922 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:25.922 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -08:44:26.088 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:26.088 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:44:26.147 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:44:27.280 [info] beam_mcp: refused by host authorize/1: :nope -... -08:44:27.991 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:44:27.997 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:44:30.117 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 59 ---- -Running ExUnit with seed: 610663, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:44:30.852 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:44:31.130 [info] beam_mcp: refused by host authorize/1: :nope -... -08:44:31.241 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:44:31.294 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:31.294 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:31.294 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:31.298 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:31.299 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:31.299 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:31.300 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:44:31.352 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:44:31.366 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:44:31.367 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:31.371 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:31.375 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:31.429 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -08:44:31.587 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:31.593 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:31.594 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:31.594 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:44:32.588 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:44:32.596 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:44:34.081 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:44:34.808 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 60 ---- -Running ExUnit with seed: 4782, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:44:36.188 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:44:36.482 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:44:36.538 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:44:36.539 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:44:36.540 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -08:44:36.540 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:44:36.646 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:36.647 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:36.648 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:36.648 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:36.648 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:36.648 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:44:36.804 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:44:36.861 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:44:36.865 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:36.924 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:44:36.926 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:36.926 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:36.927 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:36.986 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:44:40.806 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:44:40.810 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:44:40.821 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:44:40.899 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 61 ---- -Running ExUnit with seed: 399601, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:44:41.610 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:44:41.814 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:41.820 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:41.821 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:41.821 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:41.821 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:44:41.930 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:41.931 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:44:41.982 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:44:41.983 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:44:42.087 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:42.087 [info] beam_mcp: refused by host authorize/1: :nope -........... -08:44:42.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:44:42.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:44:42.250 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:42.251 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:42.251 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:44:42.361 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:42.370 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:42.370 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:44:44.094 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:44:44.807 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:44:44.825 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:44:44.902 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 62 ---- -Running ExUnit with seed: 798506, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:44:46.981 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:44:47.199 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -08:44:47.263 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:44:47.375 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:44:47.481 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:44:47.540 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:44:47.543 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:47.545 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:44:47.546 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:44:47.707 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:47.708 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:47.708 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:47.714 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:47.715 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:44:47.716 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:47.716 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:47.717 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:47.718 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:44:47.718 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:47.770 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:44:48.803 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:44:50.923 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:44:51.001 [info] beam_mcp: refused by host authorize/1: :nope -. -08:44:51.005 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 63 ---- -Running ExUnit with seed: 204645, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:44:52.391 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -08:44:52.603 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:52.604 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:52.604 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:52.660 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:44:52.661 [info] beam_mcp: refused by host authorize/1: :nope -... -08:44:52.720 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:44:52.725 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:52.730 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:44:52.835 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:44:53.047 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:53.048 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:53.049 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:53.049 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:53.050 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:53.053 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:44:53.166 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:44:53.173 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:44:53.175 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:44:53.175 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:44:54.151 [info] beam_mcp: refused by host authorize/1: :nope -. -08:44:54.207 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:44:54.933 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:44:57.050 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 64 ---- -Running ExUnit with seed: 549481, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:44:57.762 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:44:58.081 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:44:58.082 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:44:58.136 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:44:58.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:44:58.298 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:58.306 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:58.306 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:58.306 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:58.307 [info] beam_mcp: refused by host authorize/1: :nope -.............. -08:44:58.413 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:44:58.416 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:58.422 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:44:58.426 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:44:58.431 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:58.431 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:44:58.431 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:44:58.483 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:44:58.484 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:44:58.537 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:45:00.226 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:45:00.229 [info] beam_mcp: refused by host authorize/1: :nope -... -08:45:01.647 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:45:02.433 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 65 ---- -Running ExUnit with seed: 923097, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:45:03.092 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:45:03.322 [info] beam_mcp: refused by host authorize/1: :nope -... -08:45:03.374 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:03.374 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:03.375 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:03.376 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:45:03.392 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:45:03.549 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:03.553 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:45:03.560 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:03.560 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:45:03.561 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:03.563 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:03.563 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:03.564 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:03.564 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:45:03.615 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:45:03.771 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:03.829 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:03.829 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:45:05.533 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:45:07.023 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:45:07.040 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:45:07.045 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 66 ---- -Running ExUnit with seed: 238298, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:45:08.415 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................. -08:45:08.773 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:08.774 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:08.774 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:45:08.832 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:08.832 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:08.840 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:45:08.840 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:45:08.841 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:08.845 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:08.846 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:08.846 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:08.846 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:45:08.959 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:08.959 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:45:09.018 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:09.070 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:45:09.124 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:45:09.129 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:09.129 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....................... -08:45:10.938 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:45:12.349 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:45:12.353 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:45:13.155 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 67 ---- -Running ExUnit with seed: 637205, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:45:13.805 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:45:14.061 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:45:14.064 [info] beam_mcp: refused by host authorize/1: :nope -................ -08:45:14.177 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:14.231 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:45:14.394 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:45:14.401 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:45:14.453 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:14.454 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:14.455 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:45:14.455 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:14.455 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:14.456 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:14.456 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:14.456 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:45:14.567 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:14.569 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:14.628 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:45:14.629 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:14.629 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:45:15.637 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:45:15.642 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:45:15.696 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:45:15.697 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:15.701 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -........ -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 68 ---- -Running ExUnit with seed: 20002, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:45:19.263 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:45:19.463 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:45:19.464 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:19.464 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:45:19.469 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:19.472 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:19.472 [info] beam_mcp: refused by host authorize/1: :nope -..................... -08:45:19.691 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:45:19.757 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:19.758 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:45:19.759 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:45:19.811 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:45:19.819 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:19.819 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:19.819 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:19.819 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:19.820 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:45:19.880 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:19.935 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:19.936 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:45:22.474 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:22.556 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:45:23.277 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:45:24.002 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 69 ---- -Running ExUnit with seed: 480810, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:45:24.661 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................................... -08:45:24.957 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:25.009 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:45:25.118 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:25.119 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:45:25.171 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:25.171 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:25.172 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:45:25.277 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:25.278 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:25.337 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:25.344 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:25.345 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:25.345 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:25.348 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:25.399 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:45:25.457 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:45:25.463 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:25.467 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:25.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:45:26.457 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:26.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:45:27.234 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:27.238 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 70 ---- -Running ExUnit with seed: 843960, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:45:30.030 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:45:30.263 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:30.278 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:30.341 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:45:30.395 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:30.396 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:30.396 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:45:30.396 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:30.397 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:30.397 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:30.397 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -08:45:30.557 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:30.558 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:30.562 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:45:30.565 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:45:30.674 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:45:30.675 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:45:30.676 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:45:30.729 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:45:30.796 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:45:31.940 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:31.944 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:31.947 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:45:34.768 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 71 ---- -Running ExUnit with seed: 260641, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:45:35.492 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:45:35.678 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:45:35.734 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:45:35.735 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:35.736 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:35.736 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:35.736 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:35.736 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:35.736 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:35.792 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:45:35.792 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:45:35.796 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:45:35.958 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -08:45:36.064 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:36.064 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:36.065 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:45:36.184 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:36.185 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:45:36.245 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:36.250 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:45:37.969 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:45:38.038 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:45:38.042 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:45:40.155 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 72 ---- -Running ExUnit with seed: 662526, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:45:40.852 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -08:45:41.135 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:41.136 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:41.136 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:41.197 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:41.198 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:45:41.201 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:41.201 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:41.201 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:41.201 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:45:41.258 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:45:41.258 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -08:45:41.316 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:41.316 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:45:41.371 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:45:41.475 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:45:41.536 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:41.536 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:45:41.700 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:45:41.701 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:45:43.448 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:45:43.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:45:44.173 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:45:45.654 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (1.0s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 73 ---- -Running ExUnit with seed: 155156, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -08:45:46.350 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................... -08:45:46.617 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:46.617 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:46.617 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:45:46.784 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:46.784 [info] beam_mcp: refused by host authorize/1: :nope -.............. -08:45:46.839 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:46.843 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:46.845 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:46.845 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:45:46.899 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:46.902 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:45:46.902 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:46.902 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:46.903 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:46.908 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:46.960 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:45:47.071 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -08:45:47.124 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:47.125 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:45:50.209 [info] beam_mcp: refused by host authorize/1: :nope -... -08:45:50.229 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:45:50.940 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:45:51.023 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 74 ---- -Running ExUnit with seed: 518181, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -08:45:51.700 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -08:45:51.926 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:45:51.981 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:45:52.041 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:45:52.098 [info] beam_mcp: refused by host authorize/1: :nope -. -08:45:52.150 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:52.151 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:52.151 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:52.151 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:52.152 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:52.152 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:45:52.262 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:45:52.323 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:45:52.327 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:45:52.328 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:52.328 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:45:52.329 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:45:52.432 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:45:52.486 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:52.487 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:45:54.158 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:45:54.873 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:45:56.280 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:45:56.357 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 75 ---- -Running ExUnit with seed: 860400, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:45:57.030 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:45:57.268 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:45:57.345 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:57.345 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:45:57.452 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:45:57.511 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:57.511 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:57.512 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:57.512 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:57.514 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:45:57.515 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:45:57.621 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:45:57.621 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:45:57.725 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:45:57.726 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:45:57.778 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:45:57.778 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:45:57.781 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:45:57.789 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:45:57.850 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:46:00.958 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:46:00.985 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:46:01.698 [info] beam_mcp: refused by host authorize/1: :nope -. -08:46:01.781 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 76 ---- -Running ExUnit with seed: 277946, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:46:02.457 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -08:46:02.732 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:46:02.791 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:02.894 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:46:02.951 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:02.955 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:46:02.963 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:02.963 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:02.963 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:03.069 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:03.070 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:46:03.070 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:03.070 [info] beam_mcp: refused by host authorize/1: :nope -. -08:46:03.123 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:03.176 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:03.177 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:03.177 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:46:03.184 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:46:03.237 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:03.237 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -08:46:04.251 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:06.367 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:46:06.370 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:46:06.390 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 77 ---- -Running ExUnit with seed: 605265, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:46:07.821 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:46:08.020 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:08.123 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:46:08.231 [info] beam_mcp: refused by host authorize/1: :nope -............... -08:46:08.294 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:08.295 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:46:08.298 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:46:08.299 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:46:08.353 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:46:08.354 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:46:08.414 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:08.414 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:08.414 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:08.415 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:08.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:46:08.467 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:08.468 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:08.519 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:08.525 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:46:08.525 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:46:10.255 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:46:12.376 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:46:12.394 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:46:12.475 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 78 ---- -Running ExUnit with seed: 966424, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:46:13.198 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:46:13.345 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:13.348 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:13.348 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:13.349 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:13.349 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:13.455 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -08:46:13.516 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:13.517 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:13.517 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:13.519 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:13.572 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:46:13.627 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:46:13.680 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:13.688 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:13.695 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:46:13.696 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:13.748 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:46:13.754 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:13.918 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -08:46:17.040 [info] beam_mcp: refused by host authorize/1: :nope -. -08:46:17.048 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:46:17.052 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:17.076 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 79 ---- -Running ExUnit with seed: 278586, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:46:18.454 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:46:18.733 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:18.733 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:18.734 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:18.734 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:46:18.740 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:18.740 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:18.792 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:18.792 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:46:18.844 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:18.847 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:46:18.856 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:46:18.858 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:46:18.859 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:18.859 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:18.963 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:18.964 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -08:46:19.129 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:19.243 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:19.243 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:46:20.247 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:21.011 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:21.736 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:46:23.147 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 80 ---- -Running ExUnit with seed: 652359, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:46:23.838 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:46:24.067 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:24.078 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:24.291 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:24.291 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:24.344 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:46:24.402 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:24.404 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:46:24.404 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:24.404 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:24.409 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:46:24.464 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:24.518 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -08:46:24.576 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:24.577 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:24.577 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:24.577 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:24.578 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:46:24.630 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:24.630 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:46:25.646 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:46:25.652 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:25.712 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:26.437 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 81 ---- -Running ExUnit with seed: 33716, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:46:29.260 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:46:29.454 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:29.454 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:29.469 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:29.480 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:29.480 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:46:29.481 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:29.485 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:29.544 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:46:29.704 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:46:29.755 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:29.817 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:29.817 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:29.869 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:46:29.870 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:29.870 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:29.871 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:46:29.930 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:46:29.982 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:46:29.983 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -08:46:31.036 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:46:31.097 [info] beam_mcp: refused by host authorize/1: :nope -... -08:46:31.819 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:46:33.932 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 82 ---- -Running ExUnit with seed: 427109, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:46:34.614 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:46:34.858 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:46:34.924 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:34.924 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:46:34.978 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:46:35.031 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:35.032 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:46:35.033 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:46:35.085 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:35.086 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:35.086 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:46:35.146 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:46:35.152 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:35.211 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:46:35.214 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:35.326 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:35.327 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:46:35.380 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:35.380 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:35.381 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:46:37.157 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:46:38.581 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:46:38.585 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:46:38.664 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 83 ---- -Running ExUnit with seed: 876594, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:46:40.056 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................. -08:46:40.360 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:40.360 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:46:40.414 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:40.523 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:46:40.530 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:40.634 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:46:40.635 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:46:40.690 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:46:40.695 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:40.695 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:46:40.752 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:46:40.753 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:46:40.754 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:40.754 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:40.754 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:46:40.755 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:46:40.807 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:40.860 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:40.861 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:46:42.647 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:42.664 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:46:42.668 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:46:44.075 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 84 ---- -Running ExUnit with seed: 250509, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:46:45.437 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -08:46:45.665 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:46:45.671 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:45.671 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:45.671 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:46:45.672 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:45.672 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:46:45.731 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:45.731 [info] beam_mcp: refused by host authorize/1: :nope -......................... -08:46:46.001 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:46:46.003 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:46.008 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:46:46.061 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:46:46.113 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:46.114 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:46:46.226 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:46.226 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:46.226 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................... -08:46:46.229 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:46.229 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:46:49.356 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:46:50.142 [info] beam_mcp: refused by host authorize/1: :nope -... -08:46:50.161 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:46:50.169 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 85 ---- -Running ExUnit with seed: 679239, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:46:50.908 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:46:51.091 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:46:51.094 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:46:51.105 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:46:51.106 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:46:51.158 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:46:51.169 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:46:51.170 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:51.170 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:51.170 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -08:46:51.273 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:51.273 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:51.274 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:46:51.332 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:51.334 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:51.442 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:51.605 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:51.609 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:51.662 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:46:51.670 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:46:52.663 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:46:52.673 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:46:53.394 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:46:54.877 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 86 ---- -Running ExUnit with seed: 71556, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:46:56.253 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:46:56.489 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:46:56.592 [info] beam_mcp: refused by host authorize/1: :nope -... -08:46:56.695 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:46:56.703 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:46:56.704 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:56.704 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:56.704 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:46:56.809 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:56.811 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:56.814 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:46:56.814 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:46:56.815 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:46:56.820 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:46:56.821 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:46:56.825 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:46:56.825 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:46:56.825 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:46:56.929 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:46:57.044 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:46:58.070 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:46:58.130 [info] beam_mcp: refused by host authorize/1: :nope -... -08:46:58.147 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -08:47:00.974 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 87 ---- -Running ExUnit with seed: 464135, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:47:01.710 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:47:01.945 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:01.945 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:01.946 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:01.946 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:47:01.998 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:02.000 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:47:02.001 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:02.006 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:02.058 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:47:02.067 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:02.067 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:02.122 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:47:02.178 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:02.178 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:02.178 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:47:02.192 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:02.192 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:47:02.297 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:47:02.298 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -08:47:06.298 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:47:06.304 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:47:06.328 [info] beam_mcp: refused by host authorize/1: :nope -. -08:47:06.405 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 88 ---- -Running ExUnit with seed: 903310, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:47:07.140 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:47:07.320 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:07.320 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:07.321 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:07.321 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:47:07.379 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:07.380 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:07.380 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:07.380 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:47:07.433 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:07.490 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:47:07.543 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:07.549 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:07.551 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:47:07.552 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:47:07.716 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:07.717 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:47:07.774 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:07.775 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:47:07.775 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........................... -08:47:11.034 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:47:11.037 [info] beam_mcp: refused by host authorize/1: :nope -. -08:47:11.115 [info] beam_mcp: refused by host authorize/1: :nope -. -08:47:11.120 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 89 ---- -Running ExUnit with seed: 328879, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:47:12.516 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:47:12.846 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:47:12.899 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:12.903 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:47:12.903 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:12.959 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:47:12.975 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:12.975 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:12.975 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:12.976 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:47:13.190 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:13.190 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:47:13.190 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:13.191 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:13.191 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:13.192 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:47:13.192 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:13.194 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:13.200 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:13.201 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:47:14.332 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:47:14.390 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:47:17.219 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:47:17.223 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 90 ---- -Running ExUnit with seed: 710801, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:47:17.911 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:47:18.177 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:18.180 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:47:18.181 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:18.241 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:18.241 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:47:18.245 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:47:18.298 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:18.299 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:18.299 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:18.299 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:47:18.302 [info] beam_mcp: refused by host authorize/1: :nope -.................. -08:47:18.362 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:18.366 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:18.367 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:18.367 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:47:18.472 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:47:18.577 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:47:18.636 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:18.636 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:47:20.416 [info] beam_mcp: refused by host authorize/1: :nope -. -08:47:20.419 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:47:20.422 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:47:22.614 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 91 ---- -Running ExUnit with seed: 107628, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:47:23.348 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:47:23.524 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................. -08:47:23.592 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:23.593 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:23.594 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:23.594 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:47:23.653 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:23.654 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:23.654 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:47:23.756 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:47:23.757 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:23.758 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:23.809 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:47:23.814 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:23.821 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:23.821 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:23.821 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:47:23.983 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:24.036 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:47:24.088 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:47:26.509 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:47:27.221 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:47:27.229 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:47:27.310 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 92 ---- -Running ExUnit with seed: 502310, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:47:28.687 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:47:28.903 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:28.904 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:28.904 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:28.926 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:47:29.087 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:47:29.096 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:29.099 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:29.099 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:47:29.153 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:47:29.211 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:29.211 [info] beam_mcp: refused by host authorize/1: :nope -................. -08:47:29.370 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:29.370 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:29.371 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:29.377 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:29.430 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:29.431 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:47:29.483 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:47:29.486 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:47:30.512 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:47:30.569 [info] beam_mcp: refused by host authorize/1: :nope -... -08:47:30.577 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:47:30.579 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 93 ---- -Running ExUnit with seed: 896535, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:47:34.087 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:47:34.312 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:34.330 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:34.391 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:47:34.391 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:47:34.445 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:47:34.446 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:47:34.666 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:47:34.718 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:47:34.777 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:34.778 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:34.778 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:34.778 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:34.779 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:34.780 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:47:34.884 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:34.884 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:34.885 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:47:34.885 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:34.886 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:47:35.947 [info] beam_mcp: refused by host authorize/1: :nope -. -08:47:35.954 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:47:37.378 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:47:38.094 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 94 ---- -Running ExUnit with seed: 280130, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:47:39.491 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -08:47:39.864 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:47:39.865 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:47:39.866 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:39.867 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:39.867 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:39.869 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:47:39.869 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:39.870 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:39.873 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:47:40.031 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:47:40.085 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................. -08:47:40.140 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:40.147 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:40.148 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:40.148 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:40.152 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:40.157 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:40.158 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:47:40.213 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:47:41.320 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:47:41.329 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:47:41.343 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:47:44.169 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 95 ---- -Running ExUnit with seed: 665801, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:47:44.912 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:47:45.148 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:45.150 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:47:45.152 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:45.154 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:47:45.156 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:45.156 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:45.156 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:45.163 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:47:45.163 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:47:45.170 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:45.170 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:45.173 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:47:45.278 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:45.281 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:47:45.335 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:47:45.336 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:45.336 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:47:45.393 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:47:45.453 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:47:48.069 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:47:48.798 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:47:49.517 [info] beam_mcp: refused by host authorize/1: :nope -. -08:47:49.597 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 96 ---- -Running ExUnit with seed: 98612, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -08:47:50.326 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:47:50.540 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:47:50.553 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:50.553 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:47:50.616 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:47:50.728 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:47:50.833 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:50.833 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:50.842 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:47:50.948 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:50.948 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:47:51.000 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:51.000 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:51.000 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:51.001 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:47:51.004 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:51.004 [info] beam_mcp: refused by host authorize/1: :nope -. -08:47:51.057 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:51.112 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:47:51.120 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:47:52.061 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:47:52.772 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:47:52.835 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:47:54.964 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 97 ---- -Running ExUnit with seed: 457928, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:47:55.715 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:47:55.886 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:47:56.002 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:47:56.004 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:56.005 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:56.006 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:56.057 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:47:56.110 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:47:56.112 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:47:56.165 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:56.166 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:56.166 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:56.166 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:47:56.167 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:47:56.173 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:47:56.173 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:47:56.185 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:47:56.188 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:47:56.247 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:47:56.350 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -08:47:57.522 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:48:00.352 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:48:00.356 [info] beam_mcp: refused by host authorize/1: :nope -. -08:48:00.360 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 98 ---- -Running ExUnit with seed: 866929, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:48:01.051 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -08:48:01.306 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:48:01.359 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:48:01.418 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:48:01.425 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:48:01.530 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:01.531 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:01.531 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:01.533 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:48:01.597 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:48:01.598 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:48:01.651 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:48:01.756 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:01.757 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:01.757 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:01.764 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:48:01.766 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:48:01.767 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:48:01.767 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:48:01.820 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:48:02.768 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:48:04.963 [info] beam_mcp: refused by host authorize/1: :nope -. -08:48:04.967 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:48:05.694 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 99 ---- -Running ExUnit with seed: 177420, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:48:06.412 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -08:48:06.592 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:48:06.645 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:48:06.704 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:48:06.705 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:48:06.705 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:48:06.762 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:48:06.872 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:06.873 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:48:06.925 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:48:06.984 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:48:07.096 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:07.096 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:07.097 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:07.097 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:48:07.098 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:48:07.102 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:48:07.162 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:48:07.167 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:07.167 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:48:08.115 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:48:08.878 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:48:11.017 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:48:11.021 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 100 ---- -Running ExUnit with seed: 501822, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:48:11.757 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:48:11.943 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:11.954 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:11.954 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:48:11.957 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:11.957 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:48:12.014 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:48:12.014 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:48:12.072 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:48:12.178 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:48:12.192 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:12.192 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:48:12.352 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:48:12.353 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:12.353 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:12.353 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:12.353 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:12.354 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:48:12.359 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:12.360 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:48:13.520 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:48:15.004 [info] beam_mcp: refused by host authorize/1: :nope -. -08:48:15.010 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -08:48:15.744 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 - -== green-rate-mc64-idle-round2: 0 run(s) of 100 exited non-zero == diff --git a/slices/006-harness-honesty/logs/green-rate-mc64-idle.txt b/slices/006-harness-honesty/logs/green-rate-mc64-idle.txt deleted file mode 100644 index 5ebef0ad..00000000 --- a/slices/006-harness-honesty/logs/green-rate-mc64-idle.txt +++ /dev/null @@ -1,25509 +0,0 @@ -== green-rate-mc64-idle == -command: mix test --max-cases 64 (x100 consecutive runs) -background load: 0 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=5 -date: 2026-09-08T02:19:08Z - ----- run 1 ---- -Running ExUnit with seed: 48908, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:19:09.295 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:19:09.480 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:09.487 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:09.487 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:09.487 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:19:09.599 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:19:09.656 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:19:09.660 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:09.661 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:09.661 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:19:09.661 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:09.721 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:09.721 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:19:09.777 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:19:09.784 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:09.785 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:09.786 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:19:09.993 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:10.045 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:10.046 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:19:11.122 [info] beam_mcp: refused by host authorize/1: :nope -... -22:19:12.534 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:19:13.246 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:19:13.250 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 448460, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:19:14.627 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:19:14.974 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:19:15.028 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:15.028 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:19:15.137 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:15.140 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:19:15.146 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:15.146 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:15.148 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:15.149 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:15.149 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:19:15.149 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:19:15.202 [info] beam_mcp: refused by host authorize/1: :nope -... -22:19:15.306 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:19:15.358 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:19:15.359 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:19:15.367 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:19:15.422 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:15.422 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:15.423 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:19:16.403 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -22:19:18.530 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:18.534 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:19:18.612 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 814957, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:19:19.986 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:19:20.207 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:20.218 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:20.219 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:20.221 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:20.221 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:20.221 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:19:20.437 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:20.445 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:20.505 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:20.506 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:19:20.560 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:19:20.561 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:20.561 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:20.561 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:19:20.564 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:20.623 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:20.623 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -22:19:20.732 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:20.784 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -22:19:21.815 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:21.819 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:19:21.822 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:19:24.661 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 182472, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:19:25.419 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:19:25.628 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:25.636 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:19:25.644 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:19:25.748 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:19:25.805 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:19:25.910 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:25.911 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:19:25.968 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:25.969 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:25.969 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:25.969 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:25.969 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:19:26.076 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:26.077 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:26.077 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:26.084 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................... -22:19:26.146 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:26.156 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:26.156 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:19:27.204 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:19:27.267 [info] beam_mcp: refused by host authorize/1: :nope -... -22:19:27.287 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:19:30.106 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 610923, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:19:30.860 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:19:31.050 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:31.054 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:31.106 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:31.106 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:19:31.167 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:19:31.278 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:19:31.341 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:31.398 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:19:31.398 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:19:31.400 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:31.400 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:31.400 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:31.400 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:19:31.458 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:19:31.462 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:31.462 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:19:31.567 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:31.571 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:31.571 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -22:19:32.649 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:19:33.363 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:19:33.419 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:19:33.425 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 45657, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:19:36.229 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:19:36.447 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:36.447 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:36.447 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:36.458 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:19:36.468 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:19:36.573 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:36.574 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:36.574 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:19:36.625 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:36.625 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:19:36.635 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:36.635 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:19:36.640 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:19:36.695 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:36.701 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:19:36.703 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -22:19:36.868 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:36.920 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:36.972 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -22:19:38.755 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:19:38.759 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:19:39.547 [info] beam_mcp: refused by host authorize/1: :nope -... -22:19:40.960 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 472838, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:19:41.657 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:19:41.940 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:41.941 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:19:42.050 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:42.051 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:42.052 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:19:42.052 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:42.103 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:19:42.314 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:42.314 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:42.314 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:42.328 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:42.330 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:19:42.335 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:42.336 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:19:42.337 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:42.389 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:42.390 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:42.396 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:42.396 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -22:19:45.556 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:19:45.560 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:19:45.643 [info] beam_mcp: refused by host authorize/1: :nope -... -22:19:46.360 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 867160, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:19:47.119 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:19:47.284 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:19:47.396 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:19:47.403 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:19:47.458 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:47.459 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:19:47.511 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:19:47.518 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:47.523 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:47.523 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:47.523 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:47.523 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:19:47.583 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:19:47.584 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:19:47.642 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:47.694 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:47.694 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:47.694 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:19:47.746 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:19:47.798 [info] beam_mcp: refused by host authorize/1: :nope -.............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:19:50.286 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:19:51.768 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:51.773 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:19:51.776 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 288147, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:19:52.482 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:19:52.695 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:19:52.708 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:52.708 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:52.716 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:19:52.728 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:19:52.845 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:52.846 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:19:52.854 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:52.906 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:19:52.907 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:52.907 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:52.907 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:52.907 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:19:52.966 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:52.966 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:52.966 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:53.019 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:19:53.235 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:19:53.288 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:19:56.511 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:56.516 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:19:56.521 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:19:57.235 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 736064, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:19:57.947 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:19:58.218 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:19:58.269 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:58.276 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:58.278 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:58.279 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:19:58.382 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:58.441 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:58.446 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:58.453 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:19:58.557 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:19:58.557 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:19:58.665 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:19:58.666 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:58.666 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:58.666 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:19:58.667 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:19:58.669 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:58.669 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:19:58.670 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:20:00.388 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:00.392 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:20:00.449 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:00.454 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 79189, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:20:03.342 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:20:03.516 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:03.528 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -22:20:03.692 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:20:03.748 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:03.749 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:03.753 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:03.754 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:03.754 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:03.754 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:03.755 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:03.755 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:03.755 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:03.755 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................... -22:20:03.923 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:03.923 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:20:03.928 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:03.931 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:03.984 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:04.036 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:20:06.537 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:20:07.328 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:20:08.041 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:20:08.049 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 546303, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:20:08.797 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:20:08.961 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:08.962 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:08.962 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:08.962 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:20:09.020 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:09.022 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:20:09.023 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:09.080 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:09.081 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:09.084 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:20:09.135 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:20:09.190 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -22:20:09.245 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:09.246 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:09.246 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:09.356 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:09.356 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:20:09.409 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:20:09.513 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:20:10.483 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:20:10.491 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:10.548 [info] beam_mcp: refused by host authorize/1: :nope -... -22:20:11.968 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 877178, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:20:14.094 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:20:14.279 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:14.279 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:14.279 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:14.280 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:20:14.336 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:20:14.388 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:20:14.450 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:20:14.503 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:14.508 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:20:14.716 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:20:14.768 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:20:14.778 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:20:14.779 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:14.779 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:20:14.783 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:14.791 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:14.791 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:20:14.795 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:14.795 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:20:17.270 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:20:17.982 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:20:18.061 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:18.067 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 275512, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:20:19.451 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -22:20:19.687 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:19.739 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:20:19.794 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:20:19.847 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:20:19.907 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:19.907 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:19.913 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:20:20.019 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:20.025 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:20:20.083 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:20:20.084 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:20:20.136 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:20:20.137 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:20.195 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:20.196 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:20.196 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:20.196 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:20.197 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:20.248 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...........http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:20:21.258 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:20:21.984 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:20:21.988 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:20:23.393 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 596036, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:20:24.852 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:20:25.006 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:25.058 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:20:25.065 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:20:25.122 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:25.128 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:20:25.131 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:25.131 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:25.131 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:25.131 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:20:25.236 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:25.237 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:25.238 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:25.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:20:25.245 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..................... -22:20:25.462 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:25.463 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:25.515 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:20:25.577 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:25.577 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:20:26.594 [info] beam_mcp: refused by host authorize/1: :nope -... -22:20:27.379 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:27.384 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:20:28.791 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 10039, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:20:30.190 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:20:30.434 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:20:30.441 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:20:30.455 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:20:30.559 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:30.559 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:30.565 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:20:30.628 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:30.681 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:30.681 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:20:30.685 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:30.737 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:30.737 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:20:30.789 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:20:30.841 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:20:31.008 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:31.009 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:31.009 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:20:31.011 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:31.011 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:20:32.763 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:20:33.486 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:33.567 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:20:33.575 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 468770, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:20:35.695 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:20:35.944 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:20:35.946 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:35.946 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:20:36.154 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:36.154 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:20:36.212 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:36.214 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:36.214 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:20:36.222 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:36.226 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:36.226 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:36.226 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:36.226 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:20:36.230 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:36.231 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:20:36.336 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:20:36.389 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:36.397 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:36.398 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:20:38.175 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:20:39.586 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:20:39.605 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:20:40.394 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 892860, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:20:41.074 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:20:41.295 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:20:41.347 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:41.347 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:41.347 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:20:41.411 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:20:41.411 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:20:41.468 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:41.469 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:20:41.521 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:20:41.626 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:20:41.679 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:41.679 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:41.679 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:41.744 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:41.744 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:41.747 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:41.748 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:41.798 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:20:41.808 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:20:42.867 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:20:42.925 [info] beam_mcp: refused by host authorize/1: :nope -... -22:20:43.647 [info] beam_mcp: refused by host authorize/1: :nope -... -22:20:45.057 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 258016, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:20:46.513 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:20:46.694 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:46.695 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:46.712 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:20:46.712 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:46.713 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:20:46.772 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:46.772 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:20:46.827 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:46.829 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:20:46.882 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:20:46.940 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:46.940 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:20:46.992 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:46.993 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:46.993 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:20:47.098 [info] beam_mcp: refused by host authorize/1: :nope -... -22:20:47.149 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -22:20:47.261 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:47.269 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:20:51.123 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:20:51.203 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:51.208 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:20:51.212 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 720940, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:20:51.902 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:20:52.113 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:20:52.225 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:52.225 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:52.225 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:20:52.281 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:20:52.288 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:52.289 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:20:52.341 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:20:52.554 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:52.555 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:52.555 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:52.561 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:52.562 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:20:52.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:20:52.569 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:20:52.621 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:52.677 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:52.677 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:20:52.680 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:20:54.383 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:20:54.394 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:20:54.396 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:20:56.515 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 22545, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:20:57.211 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:20:57.517 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:20:57.518 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:20:57.678 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:20:57.730 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:57.737 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:20:57.738 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:20:57.742 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:20:57.794 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:57.795 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:57.795 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:20:57.798 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:20:57.903 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:57.904 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:20:57.904 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:20:57.909 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:20:57.913 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:20:57.917 [info] beam_mcp: refused by host authorize/1: :nope -. -22:20:57.969 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:20:57.970 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:21:01.848 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:01.852 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:21:01.944 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:01.949 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 452636, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:21:02.693 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -. -22:21:02.856 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:02.917 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:02.928 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:21:03.034 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:03.039 [info] beam_mcp: refused by host authorize/1: :nope -.................... -22:21:03.144 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:03.145 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:03.145 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:21:03.147 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:21:03.200 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:03.201 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:03.203 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:21:03.254 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:21:03.257 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:21:03.310 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:03.310 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:03.311 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:03.311 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:03.368 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:21:06.526 [info] beam_mcp: refused by host authorize/1: :nope -... -22:21:07.254 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:21:07.338 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:07.343 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 849824, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:21:08.066 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:21:08.350 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:08.350 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:21:08.402 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:08.407 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:08.408 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:08.408 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:08.409 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:21:08.409 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:21:08.512 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:21:08.518 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:08.571 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:08.629 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:21:08.689 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:21:08.797 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:21:08.804 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:08.805 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:08.805 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:08.805 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:08.806 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:21:09.751 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:21:10.463 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:10.522 [info] beam_mcp: refused by host authorize/1: :nope -......http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:21:12.652 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 155208, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:21:13.381 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:21:13.579 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:13.594 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:13.601 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:13.657 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:21:13.867 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:13.925 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:13.925 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:13.925 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:13.925 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:13.925 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:21:13.926 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:21:13.985 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:13.986 [info] beam_mcp: refused by host authorize/1: :nope -... -22:21:14.038 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:21:14.090 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:14.090 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:14.091 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:14.094 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:14.095 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..........................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:21:18.003 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:21:18.020 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:18.024 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:21:18.103 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 596150, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:21:18.823 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:21:19.040 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:19.041 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:19.041 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:21:19.152 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:19.153 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:21:19.204 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:19.205 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:19.207 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:21:19.207 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:19.207 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:19.208 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:19.261 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:19.267 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:21:19.320 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:21:19.325 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:21:19.380 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:19.381 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:21:19.545 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:19.552 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:21:20.587 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:21:21.302 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:21:22.709 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:21:23.443 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 956299, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:21:24.147 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:21:24.404 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:21:24.457 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:24.457 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:24.458 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:24.460 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:21:24.465 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:24.470 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:24.470 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:24.472 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:21:24.630 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:24.630 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:24.631 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:24.631 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:21:24.631 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:24.683 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:21:24.750 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:24.753 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:24.754 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:21:24.755 [info] beam_mcp: refused by host authorize/1: :nope -..........................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -...... -22:21:28.798 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:21:28.802 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:21:28.806 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:28.886 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 403395, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:21:29.642 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:21:29.801 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:21:29.859 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:21:29.914 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:29.922 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:30.024 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:21:30.076 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:30.076 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:30.077 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:21:30.082 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:30.083 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:30.083 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:30.135 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:30.135 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:30.138 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:21:30.139 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:21:30.144 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:21:30.197 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:21:30.198 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:30.250 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:21:32.122 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:21:32.836 [info] beam_mcp: refused by host authorize/1: :nope -... -22:21:34.248 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:21:34.252 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 747931, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:21:34.961 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:21:35.187 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:35.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:21:35.406 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:21:35.406 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:35.407 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:35.459 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:21:35.518 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:35.524 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:35.524 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:21:35.631 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:21:35.639 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:35.639 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:21:35.639 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:35.640 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:35.640 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:35.644 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:35.645 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:35.647 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:35.699 [info] beam_mcp: refused by host authorize/1: :nope -................... -22:21:36.779 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:21:36.840 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:21:39.684 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:21:39.692 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 189978, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:21:40.406 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:21:40.610 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:21:40.616 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:40.616 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:21:40.774 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:40.775 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:21:40.931 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:40.935 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:21:40.936 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:21:40.940 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:21:40.993 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:40.993 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:40.993 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:21:41.058 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:21:41.168 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:41.169 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:41.169 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:41.175 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:41.175 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:21:41.176 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:21:42.136 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:21:42.195 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:21:42.214 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:21:42.217 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 515828, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:21:45.704 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:21:45.917 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:21:45.939 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:45.947 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:21:46.106 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:46.106 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:46.261 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:46.265 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:46.265 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:21:46.326 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:46.331 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:46.331 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:21:46.433 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:46.433 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:46.434 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:21:46.452 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:21:46.452 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:46.453 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:21:46.453 [info] beam_mcp: refused by host authorize/1: :nope -. -22:21:46.504 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.....................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:21:48.994 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:21:49.005 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:21:49.715 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:21:49.727 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 945022, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:21:51.203 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:21:51.371 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:21:51.487 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:21:51.487 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:51.487 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:51.488 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:51.489 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:51.489 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:21:51.545 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:51.550 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:51.608 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:21:51.716 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:51.717 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:51.717 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:21:51.772 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:21:51.876 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:21:51.929 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:21:51.929 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:21:51.936 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:21:51.938 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:21:52.920 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:21:52.925 [info] beam_mcp: refused by host authorize/1: :nope -... -22:21:53.691 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:21:55.105 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 314517, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:21:56.522 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:21:56.777 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:21:56.834 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:21:56.838 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:56.954 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:21:56.955 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:56.955 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:56.955 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:21:56.957 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:21:56.961 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:21:56.967 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:21:56.967 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:57.021 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:21:57.021 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:21:57.073 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:21:57.231 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:21:57.232 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:21:57.232 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:21:57.233 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:21:57.294 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:21:58.247 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:21:58.265 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:22:00.380 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:22:01.169 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 670448, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:22:01.908 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -22:22:02.104 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:02.105 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:02.111 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:22:02.168 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:22:02.276 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:22:02.276 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:02.278 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:02.278 [info] beam_mcp: refused by host authorize/1: :nope -. -22:22:02.330 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:02.389 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:02.390 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:02.390 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:22:02.450 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:02.456 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:22:02.509 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:22:02.510 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:02.511 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:02.511 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:22:02.519 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:22:03.626 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:22:05.035 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:22:05.039 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:22:05.832 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 44436, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:22:07.268 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:22:07.535 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:22:07.644 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:07.699 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:22:07.700 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:07.702 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:07.702 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:22:07.756 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:22:07.815 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:22:07.817 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:07.876 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:07.877 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:07.877 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:07.877 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:07.930 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:22:07.982 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:07.982 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:07.985 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:22:08.037 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:22:08.038 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:22:08.990 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:22:10.407 [info] beam_mcp: refused by host authorize/1: :nope -. -22:22:10.486 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:22:11.921 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 427060, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:22:12.669 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:22:12.855 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:12.856 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:22:12.867 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:22:12.932 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:12.932 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:22:12.932 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:12.935 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:12.935 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:22:12.989 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:12.989 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:12.990 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:12.995 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:13.049 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:22:13.055 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:22:13.313 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:22:13.319 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:13.319 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:22:13.372 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:13.372 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:22:16.556 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:22:17.269 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:22:17.365 [info] beam_mcp: refused by host authorize/1: :nope -. -22:22:17.370 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 873471, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:22:18.036 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:22:18.273 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:18.383 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:18.391 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:18.394 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:22:18.503 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:18.503 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:18.503 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:18.504 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:18.504 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:18.509 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:18.510 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:18.511 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:22:18.519 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -22:22:18.520 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:22:18.521 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:22:18.630 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:18.732 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:22:18.733 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:22:18.837 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:22:20.530 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:22:20.534 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:22:20.590 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:22:21.998 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 213607, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:22:23.449 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:22:23.646 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:23.646 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:22:23.752 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:23.758 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:23.759 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:23.812 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:22:23.817 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:23.817 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:22:23.817 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:22:23.819 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:22:23.878 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:23.879 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:23.880 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:23.880 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:22:24.040 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:22:24.099 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:24.100 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:24.100 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:22:24.207 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:22:25.217 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:22:25.223 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:22:25.283 [info] beam_mcp: refused by host authorize/1: :nope -. -22:22:25.287 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 615733, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:22:28.804 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:22:29.055 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:22:29.081 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:22:29.188 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:22:29.240 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:22:29.294 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:29.294 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:29.346 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................... -22:22:29.402 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:29.408 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:22:29.462 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:29.462 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:29.462 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:29.469 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:29.520 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:22:29.626 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:29.626 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:29.627 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:29.627 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:29.627 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:22:30.604 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:22:31.316 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:22:31.376 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:22:33.504 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 7108, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:22:34.206 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:22:34.441 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:22:34.451 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:22:34.452 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:22:34.508 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:34.508 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:34.509 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:22:34.720 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:34.721 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:34.721 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:34.721 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:34.722 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:34.722 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:22:34.722 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:22:34.778 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:34.782 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:22:34.833 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:22:34.887 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:34.895 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:22:34.956 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -22:22:36.016 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:22:36.029 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:22:38.856 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:22:38.936 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 430299, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:22:39.622 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -22:22:39.959 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:39.959 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:39.959 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:39.960 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:22:39.960 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:39.960 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:22:39.965 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:22:40.017 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:40.018 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:40.018 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:40.124 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:40.124 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:22:40.176 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:40.177 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:22:40.178 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:40.178 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:22:40.286 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:22:40.345 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:22:40.407 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:22:41.459 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:22:41.476 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:22:43.600 [info] beam_mcp: refused by host authorize/1: :nope -. -22:22:43.604 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 41 ---- -Running ExUnit with seed: 804830, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:22:44.990 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -22:22:45.289 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:45.295 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:22:45.297 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:22:45.350 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:22:45.407 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:45.407 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:45.459 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:22:45.521 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:45.526 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:45.527 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:22:45.530 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:22:45.687 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:22:45.744 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:45.744 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:45.745 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:45.745 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:45.745 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:45.746 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:22:45.797 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:22:46.797 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -22:22:49.696 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:22:49.714 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:22:49.722 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 42 ---- -Running ExUnit with seed: 219919, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:22:50.390 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:22:50.612 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:50.614 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -22:22:50.782 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:50.835 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:50.835 [info] beam_mcp: refused by host authorize/1: :nope -. -22:22:50.893 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:22:50.999 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:50.999 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:51.000 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:51.000 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:51.054 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:51.054 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:51.162 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:22:51.163 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:22:51.164 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:22:51.165 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:22:51.174 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:51.174 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:22:51.181 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:22:52.950 [info] beam_mcp: refused by host authorize/1: :nope -. -22:22:52.953 [info] beam_mcp: refused by host authorize/1: :nope -... -22:22:53.666 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:22:53.670 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 43 ---- -Running ExUnit with seed: 577412, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:22:55.757 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:22:56.050 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:56.103 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:56.104 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:56.111 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:56.114 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:22:56.116 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:22:56.224 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:22:56.226 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:22:56.342 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:22:56.342 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:22:56.395 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:22:56.396 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:22:56.397 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:56.397 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:22:56.449 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:56.450 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:22:56.450 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:22:56.508 [info] beam_mcp: refused by host authorize/1: :nope -... -22:22:56.560 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -22:22:57.526 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:22:57.529 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:22:57.587 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:22:59.718 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 44 ---- -Running ExUnit with seed: 929031, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:23:01.177 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:23:01.393 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:01.394 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:01.394 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:01.394 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:23:01.454 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:01.458 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:01.459 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:23:01.511 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:01.512 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:01.514 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:23:01.676 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:23:01.682 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:23:01.684 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:01.684 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:23:01.686 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:23:01.686 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:01.686 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:01.743 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:01.744 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:23:03.578 [info] beam_mcp: refused by host authorize/1: :nope -. -22:23:03.583 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:23:05.713 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:23:05.798 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 45 ---- -Running ExUnit with seed: 297793, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:23:06.506 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:23:06.699 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -22:23:06.700 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:06.700 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:06.700 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:06.712 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:06.716 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:23:06.722 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:23:06.878 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:06.887 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:23:06.997 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:23:07.001 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:07.002 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:07.002 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:07.108 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:07.108 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:23:07.160 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:23:07.270 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:23:07.271 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:23:07.277 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:23:10.473 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:23:11.192 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:23:11.200 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:23:11.203 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 46 ---- -Running ExUnit with seed: 719217, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:23:11.907 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -22:23:12.159 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:12.159 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:12.169 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:12.175 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:12.176 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:12.176 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:12.176 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:12.231 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:12.231 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:12.231 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:12.236 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:12.237 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:23:12.237 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:23:12.392 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:12.395 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:23:12.399 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:12.452 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:23:12.556 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:23:12.556 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:23:13.720 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:23:15.931 [info] beam_mcp: refused by host authorize/1: :nope -. -22:23:15.936 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:23:15.939 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 47 ---- -Running ExUnit with seed: 130751, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:23:17.380 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:23:17.597 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:23:17.597 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:17.598 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:17.598 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:23:17.604 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:17.605 [info] beam_mcp: refused by host authorize/1: :nope -. -22:23:17.658 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:17.711 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:23:17.715 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:23:17.772 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:23:17.785 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:17.785 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:23:17.837 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:23:17.996 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:23:18.049 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:18.049 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:18.049 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:18.102 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:23:18.102 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:23:19.063 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:23:21.185 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:23:21.898 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:23:21.995 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 48 ---- -Running ExUnit with seed: 497734, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:23:22.691 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:23:22.903 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:23:22.955 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:23:23.010 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:23:23.015 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:23.015 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:23.068 [info] beam_mcp: refused by host authorize/1: :nope -................... -22:23:23.239 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:23.240 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:23:23.241 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:23:23.243 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:23.297 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:23.297 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:23.297 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:23:23.408 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:23:23.416 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:23:23.416 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:23.470 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:23.472 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:23.473 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:25.875 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:23:25.882 [info] beam_mcp: refused by host authorize/1: :nope -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:23:27.380 [info] beam_mcp: refused by host authorize/1: :nope -... -22:23:27.402 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 49 ---- -Running ExUnit with seed: 897421, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:23:28.131 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:23:28.291 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:28.292 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:28.292 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:28.407 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:28.408 [info] beam_mcp: refused by host authorize/1: :nope -... -22:23:28.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:23:28.462 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:28.463 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:23:28.572 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:28.572 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:28.573 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:23:28.625 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:23:28.630 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:23:28.634 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:23:28.637 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:28.638 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:23:28.754 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:23:28.858 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:23:28.866 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:29.866 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:23:29.870 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:23:31.998 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:23:32.080 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 50 ---- -Running ExUnit with seed: 287413, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:23:33.516 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:23:33.699 [info] beam_mcp: refused by host authorize/1: :nope -. -22:23:33.751 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:33.751 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:33.751 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:33.752 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:33.752 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:33.754 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:23:33.870 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:23:33.931 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:23:34.036 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:23:34.041 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:34.041 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:34.094 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:34.095 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:23:34.098 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:34.103 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:23:34.160 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:23:34.264 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:34.265 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -22:23:35.209 [info] beam_mcp: refused by host authorize/1: :nope -... -22:23:35.279 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:23:36.687 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:23:37.403 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 51 ---- -Running ExUnit with seed: 604455, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:23:38.783 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:23:39.070 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:39.071 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:23:39.072 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:39.076 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:39.132 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:23:39.137 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:23:39.192 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:39.192 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......................... -22:23:39.410 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:23:39.463 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:39.463 [info] beam_mcp: refused by host authorize/1: :nope -. -22:23:39.515 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:39.515 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:39.516 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:23:39.517 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:39.569 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:39.570 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:23:39.579 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:39.582 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:23:41.334 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:23:42.742 [info] beam_mcp: refused by host authorize/1: :nope -. -22:23:42.747 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:23:42.751 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 52 ---- -Running ExUnit with seed: 989795, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:23:44.143 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:23:44.382 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:44.382 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:23:44.492 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:44.548 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:23:44.608 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:23:44.610 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:44.610 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:44.611 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:44.663 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:44.663 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:44.663 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:23:44.768 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:44.768 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:23:44.820 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:23:44.879 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:23:44.886 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:23:44.892 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:44.895 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:23:44.898 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:23:45.937 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:23:45.993 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:23:45.998 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:23:46.706 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 53 ---- -Running ExUnit with seed: 303100, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:23:49.556 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:23:49.764 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:49.821 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:49.825 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:23:49.827 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:23:49.828 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:23:49.828 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:49.828 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:49.829 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:49.829 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:49.829 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:23:49.888 [info] beam_mcp: refused by host authorize/1: :nope -... -22:23:49.946 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:49.946 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:49.947 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:23:50.050 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:23:50.101 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:23:50.108 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:50.108 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:50.109 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:23:52.721 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:23:52.729 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:23:52.732 [info] beam_mcp: refused by host authorize/1: :nope -... -22:23:54.220 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 54 ---- -Running ExUnit with seed: 721185, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:23:54.962 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:23:55.193 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:23:55.193 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:23:55.195 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:55.200 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:55.252 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:23:55.306 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:23:55.309 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:55.361 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:23:55.420 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:23:55.420 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:55.420 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:55.421 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:55.421 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:23:55.426 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:23:55.532 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:23:55.589 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:23:55.590 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:23:55.590 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:23:55.591 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:23:56.658 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:23:56.717 [info] beam_mcp: refused by host authorize/1: :nope -. -22:23:56.721 [info] beam_mcp: refused by host authorize/1: :nope -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:23:58.148 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 55 ---- -Running ExUnit with seed: 42206, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:24:00.223 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:24:00.450 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:24:00.573 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:00.574 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:00.574 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:24:00.677 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:00.677 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:00.678 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:00.681 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:24:00.681 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:00.682 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:24:00.735 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:00.735 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -22:24:00.841 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:24:00.841 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:00.841 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:24:00.901 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:24:00.908 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:00.910 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:00.962 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:24:02.005 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:24:02.023 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:24:02.082 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:24:04.904 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 56 ---- -Running ExUnit with seed: 400046, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:24:05.660 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:24:05.821 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:05.828 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:24:05.942 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:24:05.994 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:05.997 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:24:06.002 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:06.061 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:06.061 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:06.061 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:06.062 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:06.062 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:06.063 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:06.066 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:06.066 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:06.066 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:24:06.126 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:06.126 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:06.178 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:24:06.237 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...........................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:24:09.536 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:24:10.325 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:10.330 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:10.334 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 57 ---- -Running ExUnit with seed: 845047, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:24:11.026 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............................. -22:24:11.349 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:11.460 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:11.460 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:24:11.520 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:24:11.525 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:24:11.581 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:24:11.581 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:24:11.637 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:11.689 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:11.690 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:24:11.744 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:24:11.797 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:24:11.798 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:11.798 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:11.799 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:11.799 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:11.799 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:11.799 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:24:11.800 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.........http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:24:12.860 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:24:13.572 [info] beam_mcp: refused by host authorize/1: :nope -... -22:24:13.581 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:24:14.307 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 58 ---- -Running ExUnit with seed: 213401, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:24:16.461 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:24:16.655 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:16.655 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:16.656 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:16.667 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:16.667 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:16.669 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:24:16.730 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:24:16.734 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:16.735 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:24:16.890 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:16.891 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:16.891 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:24:16.952 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:24:16.958 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:24:17.011 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:24:17.018 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:17.022 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:17.073 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:24:17.177 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:24:19.723 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:24:21.142 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:24:21.146 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:24:21.150 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 59 ---- -Running ExUnit with seed: 642833, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:24:21.819 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:24:22.110 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:22.169 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:24:22.222 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:22.224 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:22.224 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:22.282 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:24:22.392 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:24:22.448 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:22.449 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:24:22.450 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:24:22.450 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:24:22.502 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:22.502 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:22.503 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:24:22.511 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:22.511 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:22.563 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:24:22.564 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:22.564 [info] beam_mcp: refused by host authorize/1: :nope -................. -22:24:23.692 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:23.696 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:24:24.415 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:24:25.825 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 60 ---- -Running ExUnit with seed: 35113, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:24:27.288 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:24:27.515 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:24:27.516 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:27.516 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:27.517 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:27.517 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:27.518 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:27.518 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:27.527 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:27.528 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:24:27.585 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:27.585 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:24:27.636 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:24:27.636 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:24:27.640 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:27.692 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:24:27.760 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:27.760 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......................... -22:24:28.035 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:24:28.088 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:24:29.067 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:24:29.073 [info] beam_mcp: refused by host authorize/1: :nope -......http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:24:31.285 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:24:31.998 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.9 seconds (1.0s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 61 ---- -Running ExUnit with seed: 485422, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:24:32.667 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:24:32.905 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:32.910 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:24:32.921 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:32.922 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:24:33.030 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:24:33.082 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:24:33.082 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:24:33.083 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:33.135 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:33.136 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:33.136 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:24:33.190 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:24:33.242 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:33.242 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:24:33.303 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:33.362 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:33.362 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:24:33.467 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:24:33.476 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -..... -22:24:37.327 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:24:37.408 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:37.412 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:37.416 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 62 ---- -Running ExUnit with seed: 899469, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:24:38.088 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:24:38.302 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:38.363 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:38.363 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:38.365 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:24:38.430 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:38.431 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................. -22:24:38.590 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:38.643 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:24:38.645 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:38.645 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:24:38.651 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:38.651 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:38.651 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:24:38.762 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:38.763 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:38.763 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:38.764 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:38.764 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:38.815 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:24:39.838 [info] beam_mcp: refused by host authorize/1: :nope -... -22:24:40.560 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:24:40.564 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:24:42.762 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 63 ---- -Running ExUnit with seed: 265120, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:24:43.470 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:24:43.672 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:43.674 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:24:43.687 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:24:43.953 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:24:44.014 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:44.015 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:24:44.074 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:44.074 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:24:44.074 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:24:44.127 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:44.127 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:24:44.180 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:44.180 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:44.181 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:44.232 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:24:44.233 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:24:44.241 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:44.242 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:44.242 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:24:45.254 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:45.258 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:24:47.375 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:24:47.379 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 64 ---- -Running ExUnit with seed: 588508, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:24:48.845 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:24:49.065 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:49.065 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:49.065 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:49.066 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:24:49.066 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:49.070 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:49.070 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:49.071 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:24:49.072 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:24:49.130 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:24:49.136 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:24:49.191 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:49.191 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:24:49.194 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:24:49.195 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:24:49.301 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:24:49.405 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:24:49.511 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:49.511 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:24:52.034 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:52.042 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:24:53.463 [info] beam_mcp: refused by host authorize/1: :nope -. -22:24:53.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 65 ---- -Running ExUnit with seed: 983742, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:24:54.188 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:24:54.410 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:24:54.573 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:54.573 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:54.574 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:54.574 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:24:54.580 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:54.580 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:24:54.580 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:24:54.633 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:24:54.738 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:24:54.845 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:54.906 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:54.909 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:24:54.911 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:24:54.915 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:24:54.916 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:54.971 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:54.972 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:24:54.982 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:24:56.002 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:24:56.062 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:24:56.771 [info] beam_mcp: refused by host authorize/1: :nope -... -22:24:58.179 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 66 ---- -Running ExUnit with seed: 407603, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:24:59.589 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:24:59.871 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:59.871 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:24:59.871 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:24:59.873 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:24:59.879 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:24:59.882 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:24:59.936 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:25:00.040 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:00.041 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:00.041 [info] beam_mcp: refused by host authorize/1: :nope -....................... -22:25:00.311 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -22:25:00.311 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:25:00.322 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:25:00.323 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:00.323 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:00.327 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:00.327 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:25:00.379 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:00.385 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:25:01.424 [info] beam_mcp: refused by host authorize/1: :nope -. -22:25:01.430 [info] beam_mcp: refused by host authorize/1: :nope -. -22:25:01.433 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -22:25:03.568 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 67 ---- -Running ExUnit with seed: 769100, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:25:04.968 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -22:25:05.236 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:05.237 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:05.237 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:05.237 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:05.237 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:25:05.290 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:05.296 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:05.296 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:05.356 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:05.357 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:05.358 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:25:05.358 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:25:05.412 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:05.413 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:05.413 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:05.414 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:05.414 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:05.415 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:25:05.420 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................................ -22:25:08.148 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:25:08.175 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:25:09.667 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:09.676 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 68 ---- -Running ExUnit with seed: 178218, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:25:10.392 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:25:10.641 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:10.642 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:25:10.696 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:25:10.751 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:10.751 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:10.752 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:25:10.804 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:10.856 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:10.859 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:10.915 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:25:11.023 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:11.023 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:25:11.024 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:11.032 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:11.032 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:11.033 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:11.033 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:11.033 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:25:11.037 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:25:13.553 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:25:14.268 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:25:14.286 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:25:15.075 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 69 ---- -Running ExUnit with seed: 575962, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:25:15.778 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:25:15.980 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:15.991 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:25:16.005 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:16.006 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:25:16.007 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:25:16.062 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:16.062 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:16.062 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:16.063 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:16.076 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:16.129 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:25:16.190 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:16.190 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:16.248 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:16.300 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:25:16.351 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:25:16.511 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:16.512 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:16.512 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:25:19.678 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:25:19.682 [info] beam_mcp: refused by host authorize/1: :nope -. -22:25:19.761 [info] beam_mcp: refused by host authorize/1: :nope -. -22:25:19.768 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 70 ---- -Running ExUnit with seed: 967035, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:25:21.207 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:25:21.363 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:25:21.376 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:21.433 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:21.434 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:21.434 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:21.439 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:21.491 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:21.491 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:21.548 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:25:21.605 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:25:21.606 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:25:21.664 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:21.664 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:25:21.719 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:25:21.724 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:25:21.779 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:25:21.884 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:25:21.884 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:21.885 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:25:23.608 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:25:24.329 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:25:25.740 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:25:25.821 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 71 ---- -Running ExUnit with seed: 330335, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:25:26.502 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:25:26.827 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:26.890 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:26.890 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:25:26.943 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:26.943 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:26.943 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:26.999 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:27.052 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:25:27.058 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:27.162 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:27.165 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:27.166 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:25:27.217 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:25:27.223 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:25:27.227 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:27.231 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:27.231 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:27.232 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:27.232 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:25:28.293 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:29.004 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:25:30.415 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:31.128 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 72 ---- -Running ExUnit with seed: 631447, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:25:31.818 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:25:32.036 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:32.142 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:32.143 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:32.143 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:32.146 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:32.154 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -22:25:32.365 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:32.370 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:32.371 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:25:32.426 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:25:32.434 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:32.434 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:25:32.540 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:25:32.541 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:32.541 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:32.548 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:32.548 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:25:32.553 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:32.553 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:25:35.006 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:25:36.428 [info] beam_mcp: refused by host authorize/1: :nope -. -22:25:36.433 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:25:36.534 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 73 ---- -Running ExUnit with seed: 36659, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:25:37.237 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:25:37.419 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:25:37.478 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:37.478 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:37.479 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:25:37.593 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:37.598 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:37.599 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:25:37.600 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:25:37.653 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:37.653 [info] beam_mcp: refused by host authorize/1: :nope -............... -22:25:37.818 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:37.819 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:25:37.819 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:25:37.823 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:25:37.927 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:37.928 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -22:25:37.984 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:37.989 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:37.990 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:39.745 [info] beam_mcp: refused by host authorize/1: :nope -... -22:25:39.766 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:25:39.769 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:39.774 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 74 ---- -Running ExUnit with seed: 378938, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:25:42.611 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:25:42.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:25:42.921 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:42.921 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:42.921 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:42.927 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:42.928 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:25:42.929 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:42.929 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:42.929 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -22:25:43.105 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:43.106 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:43.109 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:25:43.162 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:43.163 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:25:43.166 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:25:43.219 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:25:43.271 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:25:43.328 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:25:43.380 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:25:44.383 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:25:45.095 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:25:45.152 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:25:45.878 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 75 ---- -Running ExUnit with seed: 783336, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:25:48.043 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:25:48.212 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:48.223 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:48.223 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:25:48.377 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:48.377 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:48.378 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:48.378 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:25:48.438 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:25:48.494 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:48.494 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:25:48.496 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:25:48.497 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:25:48.500 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:48.501 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:48.504 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:48.504 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -22:25:48.664 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:48.671 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:25:48.777 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:49.782 [info] beam_mcp: refused by host authorize/1: :nope -. -22:25:49.787 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:25:50.561 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:25:52.682 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 76 ---- -Running ExUnit with seed: 165663, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:25:53.423 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:25:53.634 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:53.634 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:53.635 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:25:53.636 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:53.636 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:25:53.742 [info] beam_mcp: refused by host authorize/1: :nope -... -22:25:53.795 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:25:53.797 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:25:53.963 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:53.967 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:25:54.073 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:54.078 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:25:54.130 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:54.130 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:54.131 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:54.134 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:25:54.136 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:54.136 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:25:54.152 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...........http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:25:55.874 [info] beam_mcp: refused by host authorize/1: :nope -. -22:25:55.879 [info] beam_mcp: refused by host authorize/1: :nope -... -22:25:57.992 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:25:57.999 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 77 ---- -Running ExUnit with seed: 498763, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:25:58.688 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:25:58.946 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:25:58.947 [info] beam_mcp: refused by host authorize/1: :nope -................ -22:25:59.062 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:25:59.174 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:59.175 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:59.175 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:59.182 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:59.234 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:59.287 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:25:59.289 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:25:59.294 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:25:59.352 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:25:59.353 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:25:59.407 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:25:59.407 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:25:59.408 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:25:59.408 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:25:59.408 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:25:59.461 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:26:00.503 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:26:01.940 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:26:03.348 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:26:03.431 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 78 ---- -Running ExUnit with seed: 940753, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:26:04.180 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:26:04.357 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:26:04.362 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:26:04.415 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:04.415 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:26:04.416 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:26:04.471 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:04.472 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:04.472 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:04.479 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:04.532 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:26:04.642 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:04.642 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:26:04.694 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:04.695 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:04.695 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:04.702 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:04.702 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:26:04.864 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:26:04.922 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.........http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:26:05.887 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:26:05.948 [info] beam_mcp: refused by host authorize/1: :nope -... -22:26:06.661 [info] beam_mcp: refused by host authorize/1: :nope -. -22:26:06.664 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 79 ---- -Running ExUnit with seed: 284499, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:26:09.528 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:26:09.718 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:26:09.722 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:09.782 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:09.833 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:26:09.841 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:09.894 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:26:10.000 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:10.001 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:10.001 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:10.007 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:26:10.065 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:26:10.125 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:10.126 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:10.126 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:26:10.182 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:10.182 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:10.182 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:26:10.285 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:26:10.294 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:26:12.042 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:26:12.047 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:26:12.049 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:26:12.052 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 80 ---- -Running ExUnit with seed: 671795, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:26:14.856 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:26:15.081 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:15.081 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:26:15.241 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:26:15.292 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:15.293 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:15.293 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:15.293 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:15.296 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:26:15.299 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:26:15.308 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:26:15.469 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:15.470 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:15.474 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:26:15.475 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:26:15.479 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:15.532 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:15.532 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:26:15.535 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:15.540 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:26:16.634 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:26:16.698 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:26:17.409 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:26:19.540 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 81 ---- -Running ExUnit with seed: 33416, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:26:20.288 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -22:26:20.474 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:20.474 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:26:20.531 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:26:20.535 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:26:20.540 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:20.540 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:26:20.601 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:20.655 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:20.708 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:20.715 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:20.774 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:20.775 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:20.827 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:20.827 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:26:20.880 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:20.880 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:20.881 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:20.881 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:26:20.883 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................. -22:26:22.040 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:26:22.047 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:26:22.050 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -22:26:24.962 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 82 ---- -Running ExUnit with seed: 470216, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:26:25.644 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................................. -22:26:25.968 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:26:25.969 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:25.975 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:26.029 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:26:26.087 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:26:26.088 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:26:26.193 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:26.194 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:26.194 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:26.194 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:26.194 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:26.252 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:26.254 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:26:26.307 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:26.307 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:26:26.375 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:26.375 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:26.375 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:26.376 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:26:27.425 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:26:28.833 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:26:28.837 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:26:28.921 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 83 ---- -Running ExUnit with seed: 849776, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:26:31.073 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:26:31.267 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:31.267 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:26:31.322 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..................... -22:26:31.433 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:31.491 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:31.542 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -22:26:31.653 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:31.666 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:31.721 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:31.722 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:26:31.723 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:31.725 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:31.726 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:31.726 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:31.726 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:31.778 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:26:31.829 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:31.830 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:31.837 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:26:32.918 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:26:32.926 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:26:35.767 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:26:35.770 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 84 ---- -Running ExUnit with seed: 268228, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:26:36.473 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:26:36.685 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:36.685 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:36.697 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:26:36.856 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:36.860 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:26:36.918 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:36.977 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:26:36.978 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:36.978 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:36.978 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:37.037 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:37.090 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:37.097 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:37.097 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:26:37.150 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:26:37.210 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:37.210 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:37.211 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:37.211 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:26:38.290 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:26:38.296 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:26:39.789 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:26:41.214 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 85 ---- -Running ExUnit with seed: 715269, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:26:41.939 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:26:42.171 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:26:42.232 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:42.233 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:26:42.286 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:26:42.339 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:42.345 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:42.346 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:42.346 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:42.347 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:42.407 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:26:42.407 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:42.408 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:42.467 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:26:42.578 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:26:42.578 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:26:42.638 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:42.638 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:42.638 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:42.639 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:26:43.749 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:26:43.754 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:26:45.188 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:26:46.671 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 86 ---- -Running ExUnit with seed: 168672, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:26:47.334 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:26:47.635 [info] beam_mcp: refused by host authorize/1: :nope -... -22:26:47.689 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:26:47.695 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:47.747 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:26:47.799 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:47.859 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:26:47.912 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:47.912 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:47.912 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:47.913 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:26:48.026 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:48.026 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:48.028 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:26:48.035 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:26:48.035 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:48.039 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:48.039 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:26:48.096 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:26:48.149 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:26:49.096 [info] beam_mcp: refused by host authorize/1: :nope -. -22:26:49.152 [info] beam_mcp: refused by host authorize/1: :nope -. -22:26:49.156 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:26:50.591 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 87 ---- -Running ExUnit with seed: 486839, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:26:52.670 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:26:52.901 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:26:52.962 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:52.969 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:26:53.024 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:26:53.083 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:26:53.087 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:26:53.244 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:53.245 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:53.248 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:53.248 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:53.248 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:53.249 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:53.249 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:26:53.358 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:53.358 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:26:53.409 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:26:53.410 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:26:53.414 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:53.414 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:26:55.151 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:26:55.210 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:26:55.217 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -22:26:57.348 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 88 ---- -Running ExUnit with seed: 858162, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:26:58.074 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:26:58.345 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:58.352 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:26:58.352 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:58.353 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:58.353 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:58.353 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:26:58.467 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:26:58.570 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:26:58.623 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:58.625 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:26:58.631 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:26:58.687 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:26:58.689 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:26:58.689 [info] beam_mcp: refused by host authorize/1: :nope -............... -22:26:58.851 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:26:58.852 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:58.852 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:26:58.852 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:26:58.860 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:26:59.819 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:27:01.307 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:01.313 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -..... -22:27:02.751 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 89 ---- -Running ExUnit with seed: 255588, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:27:03.435 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:27:03.719 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:03.720 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:27:03.773 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:03.773 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:03.773 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:03.774 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:27:03.880 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:03.883 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:27:03.936 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:27:03.943 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:03.943 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:27:03.943 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:27:03.955 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:03.955 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:27:04.008 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:04.008 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:27:04.066 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:27:04.118 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:27:04.228 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:27:05.940 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:27:05.947 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:27:06.003 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:06.006 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 90 ---- -Running ExUnit with seed: 637382, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:27:08.889 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:27:09.209 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:27:09.214 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:27:09.267 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:09.267 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:09.268 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:09.268 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:09.269 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:09.275 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:09.279 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:27:09.331 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:27:09.440 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:09.440 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:27:09.441 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:27:09.500 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:09.554 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:27:09.606 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:27:09.607 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:09.607 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:09.608 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:27:11.302 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:27:12.711 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:27:13.520 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:13.524 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 91 ---- -Running ExUnit with seed: 30969, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:27:14.227 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:27:14.441 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:14.441 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:14.441 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:14.442 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:27:14.455 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:27:14.455 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:27:14.507 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:14.513 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:27:14.517 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:27:14.626 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:14.629 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:14.737 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:27:14.790 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:27:14.792 [info] beam_mcp: refused by host authorize/1: :nope -................ -22:27:14.955 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:14.955 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:14.955 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:14.960 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:15.012 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:27:16.678 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:27:16.739 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:16.743 [info] beam_mcp: refused by host authorize/1: :nope -... -22:27:18.155 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 92 ---- -Running ExUnit with seed: 372338, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:27:19.552 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:27:19.843 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:19.843 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:19.846 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:27:19.964 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:19.964 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:27:20.069 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:20.071 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....................... -22:27:20.187 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:20.187 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:20.187 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:20.239 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:20.240 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:20.240 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:27:20.241 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:20.242 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:27:20.299 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:27:20.361 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:20.362 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:27:20.369 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:21.385 [info] beam_mcp: refused by host authorize/1: :nope -... -22:27:21.403 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:27:22.113 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:27:24.228 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 93 ---- -Running ExUnit with seed: 730225, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:27:24.984 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:27:25.170 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:25.170 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:27:25.227 [info] beam_mcp: refused by host authorize/1: :nope -... -22:27:25.279 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:27:25.385 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:27:25.553 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:27:25.606 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:25.606 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:25.606 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:27:25.615 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:25.616 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:25.618 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:25.618 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:25.618 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:25.624 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:25.625 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:27:25.677 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:27:25.730 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:25.730 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:27:27.423 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:27:27.427 [info] beam_mcp: refused by host authorize/1: :nope -... -22:27:28.837 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:27:28.932 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 94 ---- -Running ExUnit with seed: 121925, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:27:30.313 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:27:30.521 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:27:30.685 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:27:30.686 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:30.689 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:30.746 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:27:30.799 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:30.799 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:30.800 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:30.800 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:30.800 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:30.806 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:30.810 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:30.865 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:27:31.025 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:27:31.026 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:27:31.026 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:27:31.026 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:27:31.032 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:27:31.085 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:27:32.049 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:27:32.811 [info] beam_mcp: refused by host authorize/1: :nope -... -22:27:33.524 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:27:34.947 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 95 ---- -Running ExUnit with seed: 434123, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:27:35.628 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:27:35.853 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:35.855 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:27:35.963 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:27:36.016 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:36.017 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:36.017 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:27:36.018 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:27:36.080 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:27:36.137 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:36.138 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:27:36.142 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:27:36.303 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:27:36.311 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:27:36.363 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:36.367 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:36.368 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:36.368 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:36.369 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:36.421 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:27:37.432 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:27:39.558 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:27:39.637 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:27:40.354 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 96 ---- -Running ExUnit with seed: 850340, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:27:41.041 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:27:41.277 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:41.278 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:27:41.340 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:41.346 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:41.347 [info] beam_mcp: refused by host authorize/1: :nope -................. -22:27:41.566 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:41.566 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:41.567 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:27:41.568 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:27:41.622 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:41.725 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:27:41.777 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:41.777 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:41.778 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:41.779 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:41.779 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:41.779 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:41.780 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:27:41.833 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -22:27:43.546 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:27:44.256 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:27:45.744 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:45.749 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 97 ---- -Running ExUnit with seed: 256814, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:27:46.487 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:27:46.668 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:27:46.728 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:27:46.787 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:46.790 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:27:46.897 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:27:46.903 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:47.011 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:27:47.012 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:27:47.016 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:47.017 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:47.018 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:27:47.073 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:47.074 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:47.075 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:47.128 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:47.183 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:47.236 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:47.237 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:47.237 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:27:48.286 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:27:48.295 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:27:50.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:27:51.123 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 98 ---- -Running ExUnit with seed: 629553, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:27:51.835 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:27:52.042 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:52.151 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:52.152 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:52.155 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:27:52.257 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:27:52.311 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:52.311 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:27:52.369 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:27:52.374 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:27:52.433 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:27:52.433 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:52.433 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:52.434 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:27:52.435 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:27:52.498 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:52.502 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:27:52.504 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:27:52.556 [info] beam_mcp: refused by host authorize/1: :nope -... -22:27:52.608 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:53.679 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:27:55.112 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:27:56.522 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:27:56.527 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 99 ---- -Running ExUnit with seed: 20019, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:27:57.204 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:27:57.468 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:57.477 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:27:57.530 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:27:57.531 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:57.531 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:57.534 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:27:57.535 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:57.535 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:27:57.587 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:27:57.647 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:27:57.701 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:57.758 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:27:57.809 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:27:57.809 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:57.810 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........................ -22:27:57.922 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:27:57.927 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:27:57.989 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:27:58.042 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:27:59.766 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:27:59.769 [info] beam_mcp: refused by host authorize/1: :nope -. -22:27:59.771 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:28:01.971 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 100 ---- -Running ExUnit with seed: 476335, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:28:02.708 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:28:02.924 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:28:02.977 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:02.977 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:02.979 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:28:03.038 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:28:03.038 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:03.038 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:03.043 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:03.096 [info] beam_mcp: refused by host authorize/1: :nope -... -22:28:03.201 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:28:03.202 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:03.207 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:28:03.260 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:28:03.260 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:28:03.266 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:03.266 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:03.267 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:28:03.274 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:28:03.385 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:28:04.483 [info] beam_mcp: refused by host authorize/1: :nope -. -22:28:04.489 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:28:05.210 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:28:07.331 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 - -== green-rate-mc64-idle: 0 run(s) of 100 exited non-zero == diff --git a/slices/006-harness-honesty/logs/green-rate-mc8-idle-round2.txt b/slices/006-harness-honesty/logs/green-rate-mc8-idle-round2.txt deleted file mode 100644 index a826329a..00000000 --- a/slices/006-harness-honesty/logs/green-rate-mc8-idle-round2.txt +++ /dev/null @@ -1,25183 +0,0 @@ -== CORRECTION TO THE PROVENANCE NOTE BELOW -- ADDED 2026-09-08, AFTER IT == - -Appended, not edited. The note below stands as written; this block supersedes ONE of its claims. - -THE BIRTH-TIMESTAMP EVIDENCE IT CITES NO LONGER EXISTS, AND ADDING THAT NOTE IS WHAT DESTROYED -IT. The note argues this file is the clean re-run because the four *-round2 archives carry -births forming "an unbroken serial chain". Measured now: - - $ TZ=UTC stat -c '%wZ %yZ' - green-mutation-under-load-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc64-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-load32-round2.txt birth 13:36:56 mtime 13:36:56 - -All four share one birth, to the millisecond, and birth equals mtime -- the signature of a -wholesale rewrite. Prepending the note rewrote each file and reset the timestamp the note -offers as its proof. The archive that was cited as evidence was consumed by the act of citing -it. That is this slice's own subject, one level up. - -WHAT SURVIVES, AND ITS LIMIT. The `date:` lines below the note's end marker are the driver's own -output and are sequential -- 12:23:53Z, 12:30:22Z, 12:39:18Z, 12:48:16Z -- so the four archives -come from one serial driver run. What that CANNOT establish on its own is that no interference -overlapped its opening minutes, because the independent filesystem corroboration is gone. The -contaminated driver's files are deleted, so its 12:14:39Z births cannot be re-checked either. - -STATED RATHER THAN RESOLVED: this file is PROBABLY the clean re-run and the internal dates -support it, but the evidence originally offered for saying so does not hold, and no later -quiet-machine scoring table exists to cite instead -- `mutation-harness-anchors-round2.txt` is -EARLIER (12:06:42Z), not later. Recorded in FINDINGS.md under Round 2 rather than argued away. - -== END OF CORRECTION == - -== PROVENANCE NOTE -- ADDED BY HAND, AFTER THIS FILE WAS WRITTEN == - -This note is not command output and does not come from the run below. It was typed into the -top of this file after the run had finished and the file had been written. Everything below -the marker line that ends this note is the driver's own output, unaltered, byte for byte; not -one existing byte of it was edited to add this. - -WHY IT EXISTS. This filename was used twice. The FIRST run was interrupted: while its scoring -loop was live, a reviewer ran - - git checkout -- lib/beam_mcp/transport/http.ex - -against this worktree, plus two `mix test` alongside it. A mutant scored against unmutated code -reads as a SURVIVOR and is really a kill -- the direction of error this slice exists to remove --- and which row was corrupted is not recoverable by inspection. That run was therefore -DISCARDED IN FULL and its files DELETED rather than repaired. A 100-run rate archive from the -same driver, whose header line read `background load: 0` while busy loops were still running, -was discarded and deleted with it. - -THIS FILE IS THE CLEAN RE-RUN. IT IS NOT THE DISCARDED RUN. The evidence is the birth -timestamps of the four *-round2 archives, which form an unbroken serial chain written by one -driver, each beginning exactly when the previous one ends: - - green-mutation-under-load-round2.txt birth 2026-09-08T12:23:53Z - green-rate-mc8-idle-round2.txt birth 2026-09-08T12:30:22Z - green-rate-mc64-idle-round2.txt birth 2026-09-08T12:39:18Z - green-rate-mc8-load32-round2.txt birth 2026-09-08T12:48:16Z - -The contaminated driver's files were born 2026-09-08T12:14:39Z, and its mutation archive was -deleted at about 12:15Z -- before this re-run began. No file carrying one of the four births -above can be part of the discarded run. - -AND THE `background load: 0` HEADER LINE BELOW IS TRUTHFUL. It is worth saying so explicitly, -because it is the same line the deleted 12:14:39Z archive carried FALSELY. This run is inside -the 12:30-12:48Z window of the chain above, which is after every busy loop from the loaded -probes had been killed. The deleted archive printed that line while those loops were still -running; this one did not. - -== END OF HAND-ADDED NOTE -- EVERYTHING BELOW THIS LINE IS UNTOUCHED COMMAND OUTPUT == - -== green-rate-mc8-idle-round2 == -command: mix test --max-cases 8 (x100 consecutive runs) -background load: 0 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: eff906ca76c6ce59d86c46018e376195ce150efd dirty=10 -date: 2026-09-08T12:30:22Z - ----- run 1 ---- -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 531875, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:30:22.682 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -08:30:22.964 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:30:23.077 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:30:23.078 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:30:23.134 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:30:23.142 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:23.142 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:23.142 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:30:23.195 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:23.195 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:23.195 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:30:23.247 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:30:23.300 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:30:23.306 [info] beam_mcp: refused by host authorize/1: :nope -. -08:30:23.357 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:30:23.468 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:30:23.470 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:30:23.470 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:23.470 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:23.472 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:30:25.148 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:30:25.152 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:30:25.206 [info] beam_mcp: refused by host authorize/1: :nope -. -08:30:25.210 [info] beam_mcp: refused by host authorize/1: :nope -....... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 853374, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:30:28.064 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:30:28.352 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:30:28.405 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:28.411 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:30:28.464 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:28.464 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:28.464 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:30:28.523 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:30:28.526 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:30:28.633 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:28.686 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -08:30:28.801 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:30:28.853 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:28.857 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:28.858 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:28.858 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:28.860 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:30:28.860 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:30:28.861 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:30:28.869 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:30:29.884 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:30:29.890 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:30:29.946 [info] beam_mcp: refused by host authorize/1: :nope -. -08:30:29.950 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 286192, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:30:33.492 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -08:30:33.735 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:33.735 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:30:33.787 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:30:33.792 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:30:33.846 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:33.846 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:33.846 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:30:34.007 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:34.016 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:34.017 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:30:34.128 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:34.129 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:30:34.129 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:34.129 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:30:34.129 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:30:34.182 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:30:34.233 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:30:34.302 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:34.302 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:30:35.379 [info] beam_mcp: refused by host authorize/1: :nope -... -08:30:36.090 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:30:36.818 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:30:36.822 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 720460, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:30:38.980 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:30:39.136 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:30:39.237 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:30:39.296 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:39.301 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:30:39.359 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:39.367 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:39.367 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:39.367 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:39.368 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:30:39.368 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:39.368 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:39.368 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:30:39.374 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:39.375 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:30:39.428 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -08:30:39.540 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:39.541 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:30:39.645 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:30:39.698 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:30:40.741 [info] beam_mcp: refused by host authorize/1: :nope -. -08:30:40.743 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:30:43.650 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:30:43.659 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 163725, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:30:44.360 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:30:44.567 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:44.575 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:30:44.575 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:44.575 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:30:44.576 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:44.576 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:44.576 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:44.577 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:30:44.682 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:30:44.892 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:44.898 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:30:44.955 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:44.955 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:30:44.955 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:30:45.011 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:45.012 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:30:45.077 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:30:45.080 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:45.080 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:30:46.068 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:30:46.124 [info] beam_mcp: refused by host authorize/1: :nope -... -08:30:46.140 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:30:47.549 [info] beam_mcp: refused by host authorize/1: :nope -...... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 482659, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:30:49.718 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:30:49.974 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:30:49.976 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:49.977 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:49.978 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:49.978 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:49.982 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:49.990 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:49.990 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -08:30:50.306 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:50.310 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:30:50.312 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:30:50.312 [info] beam_mcp: refused by host authorize/1: :nope -... -08:30:50.364 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:30:50.417 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:30:50.425 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:30:50.426 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:50.426 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:30:50.435 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:30:50.487 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:30:52.258 [info] beam_mcp: refused by host authorize/1: :nope -. -08:30:52.263 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:30:52.266 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:30:52.269 [info] beam_mcp: refused by host authorize/1: :nope -........ -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 892811, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:30:55.154 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:30:55.361 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:30:55.371 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:30:55.428 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:55.428 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:55.428 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:55.429 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:30:55.482 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:30:55.487 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:55.490 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:30:55.491 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:30:55.491 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:30:55.494 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:30:55.494 [info] beam_mcp: refused by host authorize/1: :nope -................ -08:30:55.655 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:30:55.656 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:30:55.761 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:30:55.762 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:30:55.868 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:30:55.868 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:30:56.883 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:30:57.598 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:30:59.713 [info] beam_mcp: refused by host authorize/1: :nope -. -08:30:59.791 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 315922, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:31:00.520 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:31:00.709 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:31:00.724 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:31:00.746 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:31:00.857 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:00.857 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:31:00.863 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:00.864 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:00.864 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:00.864 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:31:00.865 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:31:00.918 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:31:01.027 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:31:01.079 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:01.079 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:01.079 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:01.079 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:31:01.182 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:31:01.183 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:01.240 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:31:02.245 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:31:04.359 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:31:05.159 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:05.164 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 659187, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:31:05.897 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -08:31:06.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:31:06.114 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:31:06.114 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:06.166 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:31:06.280 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:06.281 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:06.343 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:31:06.396 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:06.397 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:06.397 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:31:06.451 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:06.453 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:31:06.459 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:06.464 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:06.465 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:31:06.570 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:06.571 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:06.571 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:06.574 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:31:07.630 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:31:09.134 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:09.139 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:31:09.144 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 57487, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:31:11.291 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:31:11.470 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -08:31:11.577 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:31:11.634 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:11.634 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:31:11.635 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:11.640 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:31:11.798 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:11.798 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:11.798 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:11.857 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:31:11.910 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:11.915 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:11.920 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:11.924 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:12.031 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:31:12.031 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:31:12.032 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:12.032 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:12.032 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:31:12.999 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -08:31:13.722 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:31:14.510 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:14.515 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 407865, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:31:16.605 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:31:16.869 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:31:16.871 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:16.872 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:16.872 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:16.872 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:31:16.983 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:16.984 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:16.984 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:16.984 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:16.989 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:31:17.048 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:31:17.100 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:17.155 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:17.267 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:17.267 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:31:17.271 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:17.271 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:17.272 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:31:17.376 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:31:18.392 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -........ -08:31:21.228 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:21.232 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:31:21.311 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 807915, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:31:22.015 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:31:22.234 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:22.236 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:31:22.239 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:31:22.295 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:31:22.296 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:22.296 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:22.296 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:22.296 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:22.296 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:22.297 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:22.351 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:22.351 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:31:22.357 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:31:22.418 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:22.470 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:22.476 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:22.476 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:22.528 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:31:22.529 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......................... -08:31:23.731 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -......... -08:31:26.571 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:31:26.576 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:26.653 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 149556, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:31:27.345 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -08:31:27.603 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:27.603 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:27.660 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:31:27.717 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:27.717 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:27.719 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:31:27.720 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:31:27.772 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:27.773 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:27.773 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:27.830 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:27.882 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:31:27.935 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:27.946 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:27.950 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:31:27.957 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:31:28.010 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:28.010 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:31:28.115 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:31:29.121 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:31:30.544 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:31:31.954 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:31:31.958 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 469875, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:31:32.654 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -08:31:33.015 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:33.127 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:33.127 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:31:33.187 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:33.187 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:31:33.192 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:31:33.193 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:31:33.304 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:33.305 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:31:33.305 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:33.305 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:31:33.306 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:33.306 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:33.306 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:33.307 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:31:33.358 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:31:33.360 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:33.360 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:31:33.361 [info] beam_mcp: refused by host authorize/1: :nope -.................... -08:31:35.243 [info] beam_mcp: refused by host authorize/1: :nope -... -08:31:36.651 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:31:37.367 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:31:37.385 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 875033, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -08:31:38.089 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -08:31:38.317 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:31:38.375 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:38.377 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:31:38.379 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:38.380 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:31:38.435 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:31:38.495 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:31:38.495 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:38.501 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:38.502 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:38.502 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:38.502 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:31:38.606 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:31:38.606 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:31:38.664 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:38.665 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:38.665 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:31:38.770 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:31:38.874 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:31:39.836 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:31:39.839 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:31:42.737 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:42.741 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 254068, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:31:43.462 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:31:43.698 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:43.754 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:31:43.754 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:43.755 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:43.755 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:31:43.930 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:31:44.038 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:44.038 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:44.039 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:31:44.100 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:44.100 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:31:44.152 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:44.159 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:44.160 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:31:44.216 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:44.216 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:31:44.216 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:44.216 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:44.217 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:31:45.241 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:31:45.246 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:31:45.249 [info] beam_mcp: refused by host authorize/1: :nope -. -08:31:45.251 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 599083, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:31:48.818 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:31:49.039 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:49.040 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:49.040 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:49.054 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:49.057 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -08:31:49.221 [info] beam_mcp: refused by host authorize/1: :nope -... -08:31:49.275 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:49.275 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:49.275 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:49.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:31:49.278 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:49.330 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:31:49.384 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:31:49.499 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:31:49.500 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:49.500 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:49.500 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:31:49.611 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:31:49.624 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:31:50.602 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:31:51.314 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:31:53.437 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:31:53.515 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 11340, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:31:54.175 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:31:54.390 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:31:54.499 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:31:54.501 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:54.503 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:31:54.503 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:54.504 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:54.505 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:31:54.609 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:31:54.665 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:54.665 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:31:54.725 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:31:54.785 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:31:54.786 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:54.793 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:54.793 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:54.794 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:31:54.794 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:54.794 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:54.846 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -08:31:55.941 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:31:55.996 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:31:56.001 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:31:56.004 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 310973, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:31:59.566 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:31:59.735 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:31:59.739 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:31:59.797 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:31:59.801 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:59.807 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:31:59.808 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:31:59.809 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:31:59.812 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:31:59.872 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:31:59.975 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:31:59.982 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:31:59.983 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:31:59.983 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:32:00.035 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:00.035 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:00.035 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:00.035 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:00.035 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:32:00.036 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........................... -08:32:01.276 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:32:02.045 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:02.049 [info] beam_mcp: refused by host authorize/1: :nope -... -08:32:02.056 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 677418, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -08:32:04.863 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:32:05.143 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:05.150 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:32:05.162 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:05.215 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:05.216 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:05.216 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:32:05.271 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:32:05.271 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:32:05.271 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:32:05.325 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:05.326 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:05.326 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:05.384 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:32:05.491 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:05.499 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:32:05.500 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:32:05.500 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:32:05.604 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:05.604 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:32:06.707 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:32:06.724 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:32:06.727 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:32:09.553 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 41084, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:32:10.297 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:32:10.503 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:10.557 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:32:10.558 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:10.558 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:10.559 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:10.559 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:10.559 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:32:10.614 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:32:10.673 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:10.729 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:10.731 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:32:10.836 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:10.837 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:10.842 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:10.843 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:10.843 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:10.844 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..................... -08:32:11.009 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:32:11.025 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:32:12.063 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:12.069 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:32:14.910 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:32:14.919 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 413618, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:32:15.595 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:32:15.844 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:15.849 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:15.849 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:15.905 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:15.905 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:32:15.964 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:16.020 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:32:16.021 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:32:16.076 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:16.077 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:16.077 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -08:32:16.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -08:32:16.416 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:16.421 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:16.422 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:16.422 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:16.423 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:16.423 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:32:16.423 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:32:17.440 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:17.443 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:32:19.636 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:19.641 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 847675, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:32:21.095 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:32:21.270 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:32:21.330 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:21.335 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:21.339 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:21.340 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:21.392 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:21.393 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:21.393 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:21.399 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:21.400 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:21.400 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:32:21.504 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:21.507 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:32:21.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:32:21.566 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:21.567 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:21.567 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:32:21.731 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:32:21.784 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................. -08:32:22.840 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:32:25.034 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:32:25.053 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:32:25.769 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 261160, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:32:26.437 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:32:26.674 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:26.686 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:26.742 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:32:26.743 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:32:26.748 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:26.748 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:32:26.801 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:26.861 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:26.867 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........................ -08:32:27.081 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:32:27.136 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:27.136 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:27.137 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:27.137 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:27.137 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:27.138 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:27.138 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:27.138 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:32:27.194 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:32:28.180 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:32:28.945 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:28.949 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:32:29.664 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 589818, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -08:32:31.815 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:32:32.022 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:32.025 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:32.036 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:32.047 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:32.054 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -08:32:32.165 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:32.166 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:32:32.271 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:32.271 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:32:32.272 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:32.272 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:32.272 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:32:32.279 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:32.279 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:32:32.389 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:32:32.441 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:32.441 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:32:32.500 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:32.552 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:32:33.625 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:32:34.346 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:32:34.401 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:32:36.518 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 8372, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:32:37.210 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:32:37.413 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:37.429 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:32:37.537 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:37.541 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:32:37.593 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:37.594 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:37.594 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:37.601 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:32:37.604 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:37.604 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:32:37.665 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:32:37.667 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:32:37.772 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:37.824 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:32:37.832 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:32:37.890 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:37.894 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:37.948 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:37.948 [info] beam_mcp: refused by host authorize/1: :nope -.............. -08:32:39.013 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:32:39.015 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:32:40.511 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:32:41.920 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 420966, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:32:42.602 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -08:32:42.945 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:32:42.950 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:42.951 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:32:42.952 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:42.952 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:42.952 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:42.952 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:42.953 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:42.953 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:42.954 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:32:43.008 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:32:43.015 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:43.016 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:43.020 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:43.020 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:43.074 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:43.128 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:32:43.232 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:32:43.389 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:32:45.862 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:32:45.883 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:32:47.297 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:32:47.304 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 791583, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -08:32:47.978 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:32:48.225 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:32:48.280 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:48.280 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:48.332 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:48.333 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:48.334 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:32:48.439 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:48.439 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:48.440 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:48.498 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:32:48.509 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:48.514 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:32:48.514 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:48.621 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:48.622 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:32:48.679 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:48.679 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:48.680 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -08:32:48.680 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................... -08:32:52.617 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:32:52.643 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:32:52.720 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:32:52.728 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 222372, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -08:32:53.402 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:32:53.670 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:53.670 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:53.670 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:53.674 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:32:53.674 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:53.675 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:53.675 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:53.675 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:32:53.679 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:32:53.684 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:32:53.685 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:32:53.741 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:53.741 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:32:53.746 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:32:53.798 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:32:53.850 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:32:54.012 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:32:54.065 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:32:54.125 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:32:55.212 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:32:56.694 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:32:58.115 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:32:58.132 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 628967, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:32:58.828 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:32:59.042 [info] beam_mcp: refused by host authorize/1: :nope -. -08:32:59.098 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:59.159 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:32:59.265 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:59.266 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:59.266 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:59.270 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:32:59.372 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:32:59.373 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:32:59.435 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:32:59.435 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:32:59.440 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:32:59.441 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:32:59.446 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:32:59.450 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:59.450 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:32:59.450 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:32:59.451 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:32:59.503 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -08:33:00.612 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:33:02.734 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:33:03.459 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:33:03.538 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 41577, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:33:04.252 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:33:04.508 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:04.510 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:33:04.514 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:04.515 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:33:04.522 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:04.522 [info] beam_mcp: refused by host authorize/1: :nope -. -08:33:04.574 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:33:04.627 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:04.627 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:33:04.733 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:33:04.738 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:33:04.842 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:33:04.895 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:33:05.009 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:05.015 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:05.015 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:05.016 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:05.016 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:05.016 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:05.974 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:33:08.183 [info] beam_mcp: refused by host authorize/1: :nope -... -08:33:08.898 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:33:08.902 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 406461, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -08:33:09.630 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:33:09.814 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:09.817 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:09.818 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:33:09.869 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:33:09.921 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:09.922 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -08:33:10.035 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:33:10.088 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:10.088 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:10.147 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:10.149 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:10.259 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:10.261 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:33:10.263 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:10.263 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:33:10.383 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:10.383 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:10.383 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:10.384 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:33:13.515 [info] beam_mcp: refused by host authorize/1: :nope -... -08:33:13.597 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:14.308 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:33:14.328 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 837298, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:33:15.088 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:33:15.249 [info] beam_mcp: refused by host authorize/1: :nope -. -08:33:15.307 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:15.309 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:15.311 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:33:15.311 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:33:15.318 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:15.318 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:15.318 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:15.319 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:15.320 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:15.326 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:15.326 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:15.326 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:33:15.432 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:15.596 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:33:15.702 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:15.703 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:33:15.754 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:33:15.814 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:16.759 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:33:18.178 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:33:18.263 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:18.268 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 181899, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:33:20.369 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:33:20.647 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:20.706 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:20.706 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:20.706 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:20.711 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:20.715 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:33:20.767 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:20.767 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:20.773 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:33:20.826 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:20.830 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:20.882 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:20.883 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:33:20.883 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:33:20.988 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:33:20.989 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:21.041 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:21.042 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:33:21.199 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -08:33:22.225 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:33:22.282 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:33:23.006 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:23.717 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 622318, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:33:25.858 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:33:26.035 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:33:26.140 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:26.142 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:33:26.252 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:33:26.309 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:33:26.363 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:26.363 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:26.363 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:26.371 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:26.375 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:26.482 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:26.482 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:26.482 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:33:26.483 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:26.536 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:33:26.536 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:26.544 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:26.607 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:26.607 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:33:29.756 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:29.763 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:33:29.841 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:33:30.560 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 73354, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:33:31.325 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -08:33:31.496 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:33:31.497 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:31.553 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:33:31.660 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:31.661 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:31.661 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:31.661 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:31.661 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:31.662 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:33:31.662 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:31.667 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:31.670 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:31.670 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:33:31.722 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:33:31.773 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:33:31.778 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:33:31.941 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:33:31.947 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -08:33:32.053 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:33:33.091 [info] beam_mcp: refused by host authorize/1: :nope -. -08:33:33.097 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:33.102 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:33:33.105 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -......... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 451125, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:33:36.662 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:33:36.885 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:36.943 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:36.947 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:36.949 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:33:37.002 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:33:37.058 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -08:33:37.217 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:37.217 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:33:37.217 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:37.218 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:37.269 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:33:37.282 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:33:37.336 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:37.389 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:37.390 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:37.390 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:33:37.391 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:33:37.397 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:37.403 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:33:38.480 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:33:39.196 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:33:39.198 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:33:40.682 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 899820, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:33:42.159 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:33:42.313 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:42.313 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:42.381 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:33:42.434 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:33:42.487 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:42.487 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:42.544 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:42.549 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:33:42.550 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:33:42.603 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:42.604 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:42.604 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:42.604 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:33:42.605 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:33:42.605 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:33:42.713 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:42.714 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -08:33:42.777 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:42.778 [info] beam_mcp: refused by host authorize/1: :nope -....................... -08:33:45.397 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:46.805 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:33:46.810 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:33:46.813 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 318895, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:33:47.501 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................................... -08:33:47.992 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:47.992 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:33:48.045 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:48.049 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:33:48.050 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:33:48.115 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:33:48.174 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:48.175 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:48.175 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:48.175 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:33:48.176 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:33:48.180 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:48.181 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:33:48.189 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:33:48.242 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:48.242 [info] beam_mcp: refused by host authorize/1: :nope -. -08:33:48.294 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:48.294 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:33:48.295 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:33:49.292 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:33:50.065 [info] beam_mcp: refused by host authorize/1: :nope -. -08:33:50.069 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:33:50.078 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 617146, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:33:52.831 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:33:52.992 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:33:53.097 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:53.098 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:53.098 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:33:53.153 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:33:53.154 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:53.154 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:33:53.207 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:33:53.210 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:53.267 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:53.326 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:53.378 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:33:53.385 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:33:53.446 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:33:53.446 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:33:53.446 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:33:53.499 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:33:53.501 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:53.559 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:33:54.548 [info] beam_mcp: refused by host authorize/1: :nope -... -08:33:56.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:33:57.388 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:33:57.397 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 41 ---- -Running ExUnit with seed: 893329, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:33:58.156 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:33:58.424 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:33:58.483 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:58.485 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:33:58.537 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:33:58.589 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:33:58.651 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:33:58.658 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:58.659 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:58.660 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:33:58.660 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:58.660 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:33:58.661 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:33:58.664 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:33:58.724 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:33:58.725 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:33:58.777 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:58.778 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:33:58.778 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:33:58.779 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:33:59.929 [info] beam_mcp: refused by host authorize/1: :nope -... -08:34:00.650 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:34:00.654 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:34:02.780 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 42 ---- -Running ExUnit with seed: 273623, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:34:03.526 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:34:03.708 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:34:03.762 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:34:03.819 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:34:03.873 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:03.878 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:03.878 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:34:03.932 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:03.932 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:03.939 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:34:04.041 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:34:04.102 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:04.109 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:34:04.163 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:04.163 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:04.163 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:04.169 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:34:04.222 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:34:04.228 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:04.229 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:34:05.997 [info] beam_mcp: refused by host authorize/1: :nope -. -08:34:06.001 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:34:06.004 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:34:06.062 [info] beam_mcp: refused by host authorize/1: :nope -...... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 43 ---- -Running ExUnit with seed: 647637, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:34:08.871 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:34:09.061 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:34:09.067 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:34:09.223 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:09.223 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:09.223 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:09.226 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:34:09.228 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:09.228 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:34:09.341 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:09.445 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:09.446 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:34:09.555 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:09.556 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:34:09.558 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:09.558 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -08:34:09.611 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:09.611 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:09.612 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:09.618 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:34:10.565 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:34:11.277 [info] beam_mcp: refused by host authorize/1: :nope -. -08:34:11.333 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:34:12.740 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 44 ---- -Running ExUnit with seed: 977136, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:34:14.180 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:34:14.456 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:14.507 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:14.563 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:14.563 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:14.563 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:34:14.620 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:34:14.725 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:14.726 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:34:14.777 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:34:14.839 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:34:14.839 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:14.840 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:14.840 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:14.840 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:34:14.897 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:34:14.898 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:34:14.903 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:14.903 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:34:14.903 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -08:34:15.941 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:34:16.652 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:34:16.657 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -........ -08:34:18.867 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 45 ---- -Running ExUnit with seed: 365295, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -08:34:19.525 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:34:19.830 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:34:19.882 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:34:19.985 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:19.986 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:19.986 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:20.044 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:34:20.052 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:20.052 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:34:20.160 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:20.167 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:20.168 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:20.170 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:20.170 [info] beam_mcp: refused by host authorize/1: :nope -... -08:34:20.273 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:34:20.325 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:20.325 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:20.331 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:20.331 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:20.331 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -08:34:21.386 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:34:21.405 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:34:21.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:34:22.822 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 46 ---- -Running ExUnit with seed: 634819, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -08:34:24.803 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................................... -08:34:25.115 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................... -08:34:25.278 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:25.337 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:25.341 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:25.342 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:25.342 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:25.343 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:25.343 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:25.343 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:34:25.394 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:34:25.395 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:34:25.498 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:25.498 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:25.499 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:25.499 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -08:34:25.604 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:25.605 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:25.611 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:25.615 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:34:27.326 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:34:28.733 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:34:28.740 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:34:29.506 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 47 ---- -Running ExUnit with seed: 914757, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:34:30.138 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:34:30.379 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:34:30.380 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:30.381 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:30.381 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:30.381 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:34:30.432 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:34:30.434 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:34:30.487 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:34:30.490 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:30.490 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:30.543 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:34:30.596 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:30.649 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:34:30.756 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:30.761 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:30.762 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:34:30.762 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:30.762 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:34:30.819 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:34:32.528 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:34:32.532 [info] beam_mcp: refused by host authorize/1: :nope -. -08:34:32.536 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:34:33.312 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 48 ---- -Running ExUnit with seed: 116837, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:34:35.314 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:34:35.604 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:34:35.604 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:35.605 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:35.660 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -08:34:35.816 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:34:35.873 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:35.879 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:34:35.931 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:35.931 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:35.931 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:34:35.942 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:35.942 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:34:36.051 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:36.051 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:36.052 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:36.052 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:36.052 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:36.053 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:34:36.105 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:34:37.878 [info] beam_mcp: refused by host authorize/1: :nope -... -08:34:39.292 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:34:40.015 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:34:40.018 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 49 ---- -Running ExUnit with seed: 427477, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:34:40.595 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:34:40.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:34:40.902 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:34:40.904 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:40.956 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:40.957 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:34:41.015 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:41.015 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:41.016 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:41.073 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:34:41.074 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:34:41.078 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:34:41.130 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:34:41.240 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:41.241 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:34:41.292 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:34:41.293 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:41.296 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:34:41.355 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:41.356 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:34:42.425 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:34:44.547 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:34:44.552 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:34:44.576 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 50 ---- -Running ExUnit with seed: 676466, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:34:45.831 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:34:46.076 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:46.077 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:46.096 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:46.099 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:34:46.110 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -08:34:46.274 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:34:46.380 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:34:46.386 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:34:46.444 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:46.502 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:46.553 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:46.554 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:46.554 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:46.554 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:46.554 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:46.607 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:34:46.609 [info] beam_mcp: refused by host authorize/1: :nope -........... -08:34:46.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:34:46.670 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:34:49.104 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:34:49.170 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:34:49.184 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:34:49.187 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 51 ---- -Running ExUnit with seed: 15920, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:34:51.174 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -08:34:51.543 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:34:51.596 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:34:51.647 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:34:51.650 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:51.656 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:51.664 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:51.665 [info] beam_mcp: refused by host authorize/1: :nope -................. -08:34:51.777 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:51.777 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:51.777 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:51.780 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:34:51.841 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:51.842 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:34:51.894 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:34:51.999 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:34:52.000 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:52.000 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:52.004 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:52.004 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:34:54.364 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:34:54.374 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:34:55.874 [info] beam_mcp: refused by host authorize/1: :nope -. -08:34:55.879 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 52 ---- -Running ExUnit with seed: 374663, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:34:56.560 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:34:56.769 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:56.769 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:56.770 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:34:56.770 [info] beam_mcp: refused by host authorize/1: :nope -............... -08:34:56.931 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:56.932 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:34:56.932 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:34:56.990 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:56.992 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:34:56.993 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:34:57.048 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:34:57.107 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:34:57.109 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:57.112 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:34:57.170 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:34:57.170 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:34:57.224 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................. -08:34:57.334 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:34:57.334 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:34:58.285 [info] beam_mcp: refused by host authorize/1: :nope -. -08:34:58.344 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:35:01.172 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:35:01.180 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 53 ---- -Running ExUnit with seed: 701104, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:35:01.874 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -08:35:02.153 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:35:02.273 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:35:02.275 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:02.275 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:02.327 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:02.335 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:02.336 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:02.336 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:02.336 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:02.336 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:02.389 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:35:02.495 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:02.495 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:02.498 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:35:02.499 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:35:02.499 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:35:02.558 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:02.558 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:35:02.610 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -08:35:03.716 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:35:05.832 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:35:05.850 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:35:05.854 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 54 ---- -Running ExUnit with seed: 55361, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:35:07.234 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -08:35:07.462 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:07.568 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:35:07.569 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:35:07.725 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:35:07.777 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:35:07.789 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:35:07.851 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:35:07.903 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:07.904 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:07.907 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:07.960 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:35:07.962 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:07.963 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:07.963 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:07.971 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:08.023 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:08.023 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:08.023 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:08.024 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:35:09.019 [info] beam_mcp: refused by host authorize/1: :nope -. -08:35:09.022 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:09.035 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:35:09.038 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 55 ---- -Running ExUnit with seed: 358349, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:35:12.555 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:35:12.770 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:35:12.782 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:35:12.793 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:35:12.794 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:12.794 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:35:12.799 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:35:12.856 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:35:12.960 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:13.012 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:13.123 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:13.123 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:35:13.123 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:13.124 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:13.124 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:35:13.182 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:35:13.285 [info] beam_mcp: refused by host authorize/1: :nope -... -08:35:13.337 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:35:13.338 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:13.338 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:35:15.128 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:15.132 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:35:17.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:35:17.254 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 56 ---- -Running ExUnit with seed: 741553, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:35:17.918 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................................ -08:35:18.211 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:18.211 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:35:18.263 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:18.266 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:35:18.267 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:18.267 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:18.318 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:35:18.426 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:18.426 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:35:18.427 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:18.432 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:35:18.490 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:18.493 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:18.546 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:35:18.552 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -08:35:18.663 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:18.663 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:18.663 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:18.663 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:35:20.501 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:35:22.617 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:35:22.621 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:35:22.627 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 57 ---- -Running ExUnit with seed: 121592, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:35:23.382 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -08:35:23.551 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:35:23.616 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:35:23.676 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:23.680 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:23.732 [info] beam_mcp: refused by host authorize/1: :nope -. -08:35:23.783 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:35:23.785 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:35:23.837 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:23.889 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:23.890 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:35:23.943 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:23.943 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:35:23.943 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:23.944 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:23.945 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:23.945 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:35:24.010 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:24.011 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:24.011 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................... -08:35:25.124 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:35:25.184 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:25.198 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:35:28.019 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 58 ---- -Running ExUnit with seed: 527926, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:35:28.754 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:35:28.949 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:28.956 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:35:28.957 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:35:28.961 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:29.065 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:29.066 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:29.071 [info] beam_mcp: refused by host authorize/1: :nope -... -08:35:29.123 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:29.123 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:29.124 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:29.124 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:29.124 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -08:35:29.394 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:29.403 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:35:29.462 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:29.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:35:29.514 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:35:29.515 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:29.515 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:35:31.917 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:35:31.924 [info] beam_mcp: refused by host authorize/1: :nope -... -08:35:31.932 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:35:32.027 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 59 ---- -Running ExUnit with seed: 923566, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:35:34.099 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -08:35:34.425 [info] beam_mcp: refused by host authorize/1: :nope -. -08:35:34.481 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:35:34.584 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:35:34.591 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:34.592 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:35:34.594 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:35:34.594 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:34.595 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:34.595 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:34.596 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:35:34.660 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:34.661 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:34.713 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:35:34.765 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:35:34.818 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:34.819 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:34.819 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:34.820 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:34.879 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:35:35.872 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:35.880 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -08:35:36.653 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:37.363 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 60 ---- -Running ExUnit with seed: 255803, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:35:39.506 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -08:35:39.666 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:35:39.776 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:39.830 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:35:39.832 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:39.832 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:35:39.832 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:35:39.887 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:39.892 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:35:39.952 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:39.953 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:35:40.066 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:40.070 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:40.070 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:40.070 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:40.071 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:40.071 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:40.071 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:40.125 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:35:40.178 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:35:42.653 [info] beam_mcp: refused by host authorize/1: :nope -. -08:35:42.737 [info] beam_mcp: refused by host authorize/1: :nope -... -08:35:42.746 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:35:44.181 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 61 ---- -Running ExUnit with seed: 680832, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:35:44.867 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -08:35:45.141 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:35:45.198 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:35:45.252 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:45.252 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:45.253 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:35:45.309 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:45.316 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:35:45.316 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:35:45.316 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:35:45.419 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:35:45.420 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:35:45.421 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:45.474 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:45.480 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:45.484 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:45.485 [info] beam_mcp: refused by host authorize/1: :nope -. -08:35:45.536 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:45.537 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:35:45.596 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:35:46.606 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:35:46.608 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -08:35:47.385 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:48.097 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 62 ---- -Running ExUnit with seed: 4823, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -08:35:50.260 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:35:50.409 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:50.409 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:35:50.434 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:35:50.437 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:35:50.438 [info] beam_mcp: refused by host authorize/1: :nope -... -08:35:50.489 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:35:50.542 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:35:50.593 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:50.598 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:50.658 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:35:50.658 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:50.659 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:50.659 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:35:50.664 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:35:50.721 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:35:50.722 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:35:50.774 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:35:50.827 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:35:50.991 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:35:53.390 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:53.472 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:35:53.481 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:35:53.484 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 63 ---- -Running ExUnit with seed: 404665, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:35:55.623 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:35:55.834 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:55.836 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:55.853 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:35:55.867 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:35:55.979 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:35:56.189 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:56.189 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:56.189 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:56.189 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:35:56.189 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:56.194 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:56.194 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:35:56.298 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:35:56.306 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:56.308 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:35:56.308 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:35:56.308 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:35:56.308 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:35:56.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:35:59.519 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -08:36:00.254 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:36:00.258 [info] beam_mcp: refused by host authorize/1: :nope -. -08:36:00.337 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 64 ---- -Running ExUnit with seed: 848638, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:36:01.004 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:36:01.216 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:36:01.276 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:01.332 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:36:01.440 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:01.440 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:01.440 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:01.441 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:36:01.494 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -08:36:01.496 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:36:01.554 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:01.554 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:01.555 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:01.555 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:36:01.555 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:01.620 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:36:01.620 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:01.621 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:36:01.673 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:36:01.726 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:36:02.838 [info] beam_mcp: refused by host authorize/1: :nope -... -08:36:02.843 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:36:03.554 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:36:04.263 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.7 seconds (0.8s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 65 ---- -Running ExUnit with seed: 162701, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:36:06.416 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -08:36:06.592 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:36:06.600 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:06.612 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:36:06.665 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:36:06.673 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:06.674 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:36:06.882 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:36:06.935 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:36:06.988 [info] beam_mcp: refused by host authorize/1: :nope -... -08:36:07.048 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:36:07.055 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:07.056 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:07.056 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:36:07.113 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:36:07.114 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:07.114 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:07.119 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:36:07.125 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:07.178 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:36:08.173 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:36:08.229 [info] beam_mcp: refused by host authorize/1: :nope -. -08:36:08.233 [info] beam_mcp: refused by host authorize/1: :nope -... -08:36:08.237 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 66 ---- -Running ExUnit with seed: 570604, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:36:11.828 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -08:36:12.007 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:12.008 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:12.027 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:36:12.037 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:12.043 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:36:12.043 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:36:12.102 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:36:12.102 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:36:12.154 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:36:12.270 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:36:12.323 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:12.323 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:12.323 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:12.324 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:36:12.376 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:12.377 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:36:12.480 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:36:12.585 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:36:12.591 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:36:15.081 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:36:15.089 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:36:15.113 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:36:16.521 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 67 ---- -Running ExUnit with seed: 28534, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:36:17.274 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:36:17.490 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:36:17.491 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:17.491 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................................ -08:36:17.613 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:36:17.615 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:17.615 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:36:17.719 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:36:17.822 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:17.822 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:17.881 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:36:17.935 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:17.935 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:17.935 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:36:17.994 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:36:18.051 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:18.056 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:18.056 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:36:18.061 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:18.062 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:36:19.728 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:36:19.731 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:36:19.786 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:36:21.203 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (1.0s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 68 ---- -Running ExUnit with seed: 347815, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:36:22.566 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -08:36:22.788 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:22.798 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:22.803 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:22.803 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:36:22.859 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:36:22.914 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:36:22.915 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:22.922 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:36:23.032 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:36:23.146 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:23.148 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:36:23.148 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:23.148 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:36:23.149 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:36:23.201 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:23.202 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:23.202 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:23.202 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:36:23.306 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:36:25.022 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:36:25.026 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:36:26.487 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:36:27.212 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 69 ---- -Running ExUnit with seed: 622211, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:36:27.848 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:36:28.034 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:28.048 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:36:28.213 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:28.213 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:28.214 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:36:28.223 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:36:28.227 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:28.228 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:28.233 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:28.284 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:36:28.390 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:28.390 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:28.391 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:28.391 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:28.399 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:28.451 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -08:36:28.451 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:28.451 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:36:28.559 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:36:29.615 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -08:36:32.440 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:36:32.446 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:36:32.501 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 70 ---- -Running ExUnit with seed: 920676, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:36:33.102 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:36:33.346 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:36:33.401 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:33.402 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:33.403 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:36:33.456 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:33.456 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:36:33.508 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:33.515 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:33.520 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:33.525 [info] beam_mcp: refused by host authorize/1: :nope -........... -08:36:33.632 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:36:33.632 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:33.633 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:33.633 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:36:33.688 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:36:33.799 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:36:33.799 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:36:33.851 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:36:33.911 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:36:34.880 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:36:37.058 [info] beam_mcp: refused by host authorize/1: :nope -. -08:36:37.064 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:36:37.779 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 71 ---- -Running ExUnit with seed: 192243, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:36:38.395 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -08:36:38.681 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:38.689 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:36:38.690 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:36:38.694 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:36:38.753 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:38.811 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:38.864 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:36:38.865 [info] beam_mcp: refused by host authorize/1: :nope -.............. -08:36:39.122 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:36:39.174 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:39.175 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:39.175 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:39.175 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:39.179 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:39.180 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:36:39.180 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:39.181 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:39.181 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:39.181 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:36:41.559 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:36:43.032 [info] beam_mcp: refused by host authorize/1: :nope -. -08:36:43.036 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:36:43.039 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 72 ---- -Running ExUnit with seed: 455844, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:36:43.652 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:36:43.918 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:36:43.923 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:36:43.978 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -08:36:44.044 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:44.045 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:36:44.097 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:44.097 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:44.097 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:44.098 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:36:44.155 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:36:44.156 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:44.156 [info] beam_mcp: refused by host authorize/1: :nope -............ -08:36:44.318 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:44.318 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -08:36:44.370 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:36:44.371 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:44.374 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:36:44.479 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:44.479 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:36:45.522 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:36:47.654 [info] beam_mcp: refused by host authorize/1: :nope -. -08:36:47.659 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:36:47.668 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 73 ---- -Running ExUnit with seed: 776008, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:36:48.997 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:36:49.267 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:36:49.269 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:36:49.327 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:36:49.430 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:49.431 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:49.431 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:36:49.433 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:49.436 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:36:49.548 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:49.549 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:49.549 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:49.549 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:36:49.552 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:36:49.552 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:49.552 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -08:36:49.556 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:49.557 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:49.557 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -08:36:49.661 [info] beam_mcp: refused by host authorize/1: :nope -....................... -08:36:50.839 [info] beam_mcp: refused by host authorize/1: :nope -. -08:36:50.844 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:36:52.259 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:36:53.670 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 74 ---- -Running ExUnit with seed: 95546, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:36:54.321 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:36:54.581 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:36:54.588 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:54.600 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:54.600 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:54.601 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:54.601 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:36:54.658 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:36:54.765 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:36:54.823 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:54.824 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:36:54.875 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:36:54.876 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:54.876 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:54.876 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:36:54.929 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:36:54.980 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:36:54.981 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:36:54.981 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:36:55.084 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -08:36:56.881 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:36:57.606 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:36:59.016 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:36:59.020 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (1.0s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 75 ---- -Running ExUnit with seed: 392157, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:36:59.547 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -08:36:59.756 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:36:59.807 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:36:59.862 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:36:59.920 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:59.920 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:36:59.920 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:36:59.920 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -08:37:00.026 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:00.032 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:37:00.090 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:00.093 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:00.095 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:37:00.158 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:37:00.162 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:00.214 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:00.215 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:37:00.216 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:00.216 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:00.267 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:37:01.269 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:37:02.035 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:02.039 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:37:03.448 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -Finished in 4.7 seconds (0.8s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 76 ---- -Running ExUnit with seed: 681264, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:37:04.939 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:37:05.103 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:05.162 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:05.167 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:05.167 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:05.225 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:05.227 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:37:05.228 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:37:05.229 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -08:37:05.281 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:05.282 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:05.282 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:05.282 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:37:05.390 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:37:05.442 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:05.449 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:05.456 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:05.458 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:37:05.562 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:05.563 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:37:06.659 [info] beam_mcp: refused by host authorize/1: :nope -... -08:37:08.069 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:37:08.091 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:37:08.168 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 77 ---- -Running ExUnit with seed: 86887, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:37:10.311 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -08:37:10.534 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:37:10.592 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:10.646 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:10.650 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:37:10.654 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:10.654 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:10.654 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:10.655 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:10.655 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:37:10.656 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:37:10.666 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:10.666 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:10.667 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:10.667 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:10.667 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:37:10.771 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:37:10.831 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:37:10.989 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:10.989 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........................... -08:37:14.218 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:37:14.295 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:14.301 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:37:15.012 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 78 ---- -Running ExUnit with seed: 495284, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:37:15.710 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:37:15.885 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:37:15.996 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:37:15.997 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:15.997 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:37:16.160 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:16.164 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:16.165 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:16.165 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:16.165 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:16.165 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:37:16.218 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:16.224 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:37:16.224 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:16.276 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:16.279 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:37:16.448 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:16.448 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:16.449 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:16.449 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:37:18.905 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:37:19.690 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:19.695 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:37:20.413 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 79 ---- -Running ExUnit with seed: 911563, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:37:21.102 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:37:21.408 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:21.410 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:37:21.465 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..................... -08:37:21.526 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:37:21.527 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:21.531 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:21.647 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:21.647 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:21.706 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:21.706 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:37:21.709 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:21.762 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:37:21.762 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:37:21.763 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:21.814 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:21.814 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:21.815 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:21.815 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:21.815 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:37:23.575 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:37:25.070 [info] beam_mcp: refused by host authorize/1: :nope -... -08:37:25.783 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:37:25.787 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 80 ---- -Running ExUnit with seed: 282615, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -08:37:26.493 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:37:26.695 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:26.695 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:26.696 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:37:26.811 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:26.812 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:26.917 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:26.918 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:26.918 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:37:26.974 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:37:27.032 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:37:27.086 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:37:27.087 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:37:27.139 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:37:27.199 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:27.204 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:27.205 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:37:27.206 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:37:27.210 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:27.210 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:37:28.320 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:28.326 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:37:29.737 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -08:37:31.171 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 81 ---- -Running ExUnit with seed: 669775, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:37:31.844 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:37:32.103 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:37:32.103 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:32.155 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:32.156 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:32.156 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:32.157 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:32.160 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:32.212 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:37:32.263 [info] beam_mcp: refused by host authorize/1: :nope -................... -08:37:32.486 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:32.486 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:32.598 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:37:32.651 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:32.659 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:32.659 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:37:32.665 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:37:32.666 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:32.666 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:32.666 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:33.646 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:37:33.661 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:37:33.667 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:37:33.723 [info] beam_mcp: refused by host authorize/1: :nope -....... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 82 ---- -Running ExUnit with seed: 41402, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:37:37.294 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -. -08:37:37.479 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:37.479 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:37.479 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:37.501 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:37:37.514 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:37:37.514 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:37:37.622 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:37.676 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:37.677 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:37.677 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:37.677 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:37:37.729 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................... -08:37:37.887 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:37:37.887 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:37:37.945 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:37.951 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:37.952 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:37.956 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:38.015 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:39.065 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:37:40.485 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:40.563 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:40.569 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -Finished in 4.9 seconds (1.0s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 83 ---- -Running ExUnit with seed: 489763, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:37:42.696 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:37:42.964 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:37:43.074 [info] beam_mcp: refused by host authorize/1: :nope -. -08:37:43.126 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:43.127 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:43.127 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:43.129 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:37:43.185 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:37:43.186 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:43.186 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:43.186 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:37:43.187 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:37:43.189 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:43.190 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:43.191 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:43.295 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:37:43.308 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:37:43.361 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:43.471 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:43.471 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:37:45.173 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:37:45.887 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:37:45.984 [info] beam_mcp: refused by host authorize/1: :nope -... -08:37:47.393 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 84 ---- -Running ExUnit with seed: 895028, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:37:48.146 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -08:37:48.293 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:48.310 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:48.310 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:48.310 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:48.311 [info] beam_mcp: refused by host authorize/1: :nope -.............. -08:37:48.417 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:37:48.423 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:37:48.532 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:37:48.586 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:37:48.592 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:37:48.593 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:48.593 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:48.645 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:48.649 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:37:48.650 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:48.650 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:48.650 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:37:48.760 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:37:48.820 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:37:49.885 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:37:49.891 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:37:49.947 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:37:52.790 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 85 ---- -Running ExUnit with seed: 292493, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:37:53.555 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:37:53.763 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:37:53.822 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:37:53.881 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:53.881 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:37:53.934 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:53.935 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:37:53.935 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:53.942 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:37:54.047 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:37:54.101 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:54.158 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:54.158 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:54.158 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:54.164 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:37:54.166 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:54.166 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:54.166 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:37:54.274 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:54.278 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:37:55.291 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:37:56.792 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:37:56.798 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:37:56.802 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 86 ---- -Running ExUnit with seed: 716780, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:37:58.933 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -08:37:59.148 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:37:59.203 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:37:59.256 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:59.256 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:37:59.267 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:59.272 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:59.273 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:37:59.274 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:59.274 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:37:59.274 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:59.275 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:37:59.327 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:37:59.380 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:37:59.380 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:37:59.595 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:37:59.596 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:37:59.600 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:37:59.600 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:37:59.710 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:38:00.745 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:38:01.458 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:38:01.461 [info] beam_mcp: refused by host authorize/1: :nope -. -08:38:01.464 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 87 ---- -Running ExUnit with seed: 80420, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -08:38:04.263 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -08:38:04.568 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:04.569 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:04.621 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:04.673 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:04.727 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:38:04.780 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:04.832 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:04.837 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:04.837 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:38:04.844 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:04.844 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:04.849 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:38:04.962 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:04.962 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:04.962 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:38:04.963 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:38:05.014 [info] beam_mcp: refused by host authorize/1: :nope -... -08:38:05.072 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:05.072 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:38:07.471 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:38:08.262 [info] beam_mcp: refused by host authorize/1: :nope -... -08:38:08.277 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:38:08.991 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 88 ---- -Running ExUnit with seed: 508428, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:38:09.712 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -08:38:09.975 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:09.975 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:09.975 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:09.983 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:09.983 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:09.986 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:38:10.142 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:38:10.247 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:10.248 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:38:10.300 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:38:10.409 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:10.409 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:38:10.410 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:10.410 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:38:10.478 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:10.478 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:10.479 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:10.483 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:38:10.485 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:38:11.479 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:38:11.536 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:38:12.951 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:38:12.968 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 89 ---- -Running ExUnit with seed: 881656, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:38:15.084 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:38:15.291 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:15.292 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:15.292 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:15.305 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:38:15.413 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:15.414 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:38:15.526 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:38:15.586 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:15.590 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:15.643 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:15.649 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:38:15.651 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:15.703 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:38:15.707 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:15.760 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:15.761 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:15.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:38:15.813 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:15.813 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:38:17.637 [info] beam_mcp: refused by host authorize/1: :nope -... -08:38:19.753 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:38:19.758 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:38:19.779 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 90 ---- -Running ExUnit with seed: 275790, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:38:20.528 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:38:20.692 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:20.746 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -08:38:20.802 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:38:20.855 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:20.855 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:20.855 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:20.856 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:38:21.010 [info] beam_mcp: refused by host authorize/1: :nope -. -08:38:21.068 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................................... -08:38:21.136 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:21.136 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:21.140 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:21.141 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:21.141 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:21.141 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:21.141 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:21.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:38:21.194 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:21.201 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:38:22.280 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:38:24.397 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:38:25.109 [info] beam_mcp: refused by host authorize/1: :nope -. -08:38:25.114 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 91 ---- -Running ExUnit with seed: 616158, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:38:25.791 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -08:38:26.223 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:38:26.276 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:38:26.329 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:38:26.384 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:26.392 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:38:26.445 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:26.453 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:26.454 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:38:26.457 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:26.458 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:26.458 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:38:26.461 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:38:26.520 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:38:26.521 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:26.521 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:26.522 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:26.522 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:26.522 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:26.523 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -08:38:27.609 [info] beam_mcp: refused by host authorize/1: :nope -. -08:38:27.615 [info] beam_mcp: refused by host authorize/1: :nope -... -08:38:27.630 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -08:38:29.748 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 92 ---- -Running ExUnit with seed: 944432, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:38:31.158 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:38:31.428 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:31.429 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:31.429 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:31.429 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:31.482 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:38:31.539 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:31.540 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:38:31.540 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:31.541 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:38:31.604 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:38:31.663 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:38:31.716 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:31.716 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:31.718 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:31.718 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:38:31.821 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:38:31.930 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:38:31.931 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:31.937 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:38:32.928 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -08:38:35.135 [info] beam_mcp: refused by host authorize/1: :nope -... -08:38:35.846 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:38:35.850 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 93 ---- -Running ExUnit with seed: 360039, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:38:36.544 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -08:38:36.831 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:36.933 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:38:36.939 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:36.940 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:38:37.050 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:37.052 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:38:37.104 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:38:37.163 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:38:37.214 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:38:37.214 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:37.215 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:37.215 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:37.215 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:38:37.270 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:38:37.322 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:37.322 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:37.323 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:37.323 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:37.323 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:38:38.285 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:38:38.341 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:38:39.054 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -08:38:41.183 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 94 ---- -Running ExUnit with seed: 682002, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:38:41.935 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:38:42.112 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:38:42.170 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:42.172 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:38:42.226 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:42.226 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:42.226 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:42.229 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:38:42.286 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:38:42.344 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:42.396 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:42.397 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:42.400 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:38:42.504 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -08:38:42.558 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:38:42.615 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:38:42.674 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:38:42.680 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:42.681 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:42.682 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:38:43.710 [info] beam_mcp: refused by host authorize/1: :nope -... -08:38:43.725 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:38:44.434 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:38:44.437 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 95 ---- -Running ExUnit with seed: 43685, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:38:47.296 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -08:38:47.485 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:38:47.553 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:38:47.556 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:47.557 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:47.564 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:47.565 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:38:47.670 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:47.670 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:38:47.729 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:47.730 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:47.781 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:38:47.888 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:38:47.941 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:47.942 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:47.942 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:47.942 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:47.943 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:47.943 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -08:38:48.002 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:38:49.028 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:38:49.795 [info] beam_mcp: refused by host authorize/1: :nope -... -08:38:51.212 [info] beam_mcp: refused by host authorize/1: :nope -. -08:38:51.216 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 96 ---- -Running ExUnit with seed: 287979, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:38:52.500 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:38:52.727 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:52.730 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:38:52.731 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:38:52.737 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................. -08:38:52.790 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:38:52.842 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:38:52.843 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:38:52.900 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:52.960 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:38:52.967 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:52.967 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:38:53.024 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:38:53.129 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:53.129 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:38:53.233 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:53.234 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:53.234 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:53.239 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:53.239 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:38:54.230 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:38:54.297 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:38:54.306 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:38:57.128 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 97 ---- -Running ExUnit with seed: 641988, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:38:57.907 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -08:38:58.060 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:58.061 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:58.061 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:58.061 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -08:38:58.122 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:38:58.123 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:58.124 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:38:58.124 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:58.181 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:38:58.185 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:58.192 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:38:58.192 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:38:58.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:38:58.299 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:38:58.354 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:38:58.358 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:38:58.513 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:38:58.565 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:38:58.565 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................... -08:38:59.589 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:38:59.592 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -08:39:01.780 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:01.784 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 98 ---- -Running ExUnit with seed: 10661, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:39:03.253 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:39:03.460 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:03.460 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:03.461 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:03.461 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:03.461 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:03.516 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:39:03.517 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:03.518 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:39:03.519 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:03.519 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:39:03.677 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:39:03.682 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:03.683 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:39:03.741 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:39:03.861 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:03.912 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:39:03.913 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:03.914 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:39:03.967 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:39:04.988 [info] beam_mcp: refused by host authorize/1: :nope -... -08:39:05.006 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:39:06.418 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:06.422 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 99 ---- -Running ExUnit with seed: 329884, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:39:08.587 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:39:08.743 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:08.743 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:08.744 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:08.744 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:39:08.798 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:39:08.858 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:39:08.922 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:39:08.975 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:09.027 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:39:09.084 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:09.084 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:09.085 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:09.088 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:39:09.148 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:09.151 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:09.152 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:39:09.257 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:39:09.257 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:39:09.310 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:39:10.252 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:39:10.325 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:39:11.733 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:39:12.443 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.7 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 100 ---- -Running ExUnit with seed: 648754, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -08:39:13.827 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................................. -08:39:14.214 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:39:14.218 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:14.222 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:39:14.274 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:14.274 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:14.274 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:14.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -08:39:14.278 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:39:14.330 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:39:14.385 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:39:14.386 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:39:14.446 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:14.447 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:39:14.447 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:39:14.500 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:39:14.552 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:39:14.604 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:39:14.605 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:39:14.605 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:39:15.587 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:39:15.646 [info] beam_mcp: refused by host authorize/1: :nope -. -08:39:15.649 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -......... -08:39:18.491 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -164 tests, 0 failures -RUN_EXIT=0 - -== green-rate-mc8-idle-round2: 0 run(s) of 100 exited non-zero == diff --git a/slices/006-harness-honesty/logs/green-rate-mc8-idle.txt b/slices/006-harness-honesty/logs/green-rate-mc8-idle.txt deleted file mode 100644 index d723bf8e..00000000 --- a/slices/006-harness-honesty/logs/green-rate-mc8-idle.txt +++ /dev/null @@ -1,25512 +0,0 @@ -== green-rate-mc8-idle == -command: mix test --max-cases 8 (x100 consecutive runs) -background load: 0 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=5 -date: 2026-09-08T02:10:09Z - ----- run 1 ---- -Running ExUnit with seed: 767529, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:10:09.974 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:10:10.146 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:10:10.207 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:10.208 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:10.272 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:10:10.277 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:10.329 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:10:10.329 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:10:10.437 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:10.442 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:10.443 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:10.443 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:10:10.496 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:10.549 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:10.550 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:10.550 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:10.555 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:10.556 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:10:10.556 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:10.608 [info] beam_mcp: refused by host authorize/1: :nope -............. -22:10:12.468 [info] beam_mcp: refused by host authorize/1: :nope -... -22:10:13.182 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:14.605 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:14.610 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 103579, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:10:15.291 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -22:10:15.521 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:15.532 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:10:15.694 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:10:15.694 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:10:15.700 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:15.700 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:10:15.762 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:15.762 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:15.764 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:10:15.764 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:15.817 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:15.817 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:15.818 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:15.818 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:15.818 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:10:15.871 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:10:15.926 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:15.930 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:10:16.034 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:10:18.512 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:10:18.592 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:18.598 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:20.017 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 518991, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:10:20.742 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:10:21.040 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:21.040 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:21.041 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:10:21.095 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:21.097 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:10:21.097 [info] beam_mcp: refused by host authorize/1: :nope -.................... -22:10:21.322 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:21.322 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:21.323 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:21.326 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:10:21.391 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:21.396 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:21.460 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:10:21.461 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:10:21.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:10:21.463 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:21.463 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:21.464 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:21.464 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -22:10:24.038 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:24.046 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:10:24.764 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:25.490 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 989720, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:10:26.238 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -22:10:26.451 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:10:26.504 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:26.504 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:26.507 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:26.507 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:26.507 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:26.512 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:10:26.514 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:10:26.573 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:26.574 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:26.574 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:26.574 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:10:26.628 [info] beam_mcp: refused by host authorize/1: :nope -... -22:10:26.685 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:10:26.697 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:26.698 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:26.700 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:10:26.803 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:10:26.961 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:10:27.953 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -22:10:30.782 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:30.787 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:30.867 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 376909, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:10:31.579 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:10:31.815 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:31.815 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:10:31.921 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:10:31.922 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:31.923 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:31.924 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:10:31.976 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:10:31.989 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:31.989 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:32.045 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:32.101 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:10:32.205 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:10:32.205 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:10:32.264 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:32.265 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:32.265 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:32.265 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:32.325 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:10:32.330 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:10:33.293 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:10:33.296 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:33.299 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:10:35.487 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 710665, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:10:36.960 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:10:37.158 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:37.166 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:10:37.169 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:10:37.169 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:37.170 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:37.171 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:10:37.234 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:37.234 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:10:37.239 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:10:37.298 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:37.299 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:37.299 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:37.299 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:37.299 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:37.299 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:10:37.354 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:37.405 [info] beam_mcp: refused by host authorize/1: :nope -...................... -22:10:37.612 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:10:37.612 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:10:38.651 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:10:41.493 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:10:41.501 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:10:41.586 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 78969, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:10:42.266 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:10:42.477 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:42.478 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:42.534 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:10:42.594 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:42.594 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:10:42.595 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:10:42.596 [info] beam_mcp: refused by host authorize/1: :nope -.......................................... -22:10:42.920 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:42.924 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:42.924 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:42.924 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:10:42.925 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:42.986 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:42.990 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:42.990 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:42.991 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:42.991 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:42.991 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:42.991 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:10:44.096 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:44.102 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:10:44.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:45.536 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 442544, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:10:47.678 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:10:47.895 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:47.895 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:10:48.105 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:48.106 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:48.106 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:10:48.162 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:48.167 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:48.172 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:48.172 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:10:48.233 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:48.288 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:10:48.341 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:48.342 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:48.346 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:48.353 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:10:48.459 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:48.459 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:10:48.460 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:10:48.460 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:10:50.168 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:10:50.956 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:10:50.965 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:50.983 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 893584, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:10:53.104 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:10:53.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:10:53.306 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:53.306 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:10:53.424 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:53.424 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:53.424 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:10:53.588 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:10:53.589 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:53.590 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:10:53.649 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:10:53.703 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:53.703 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:53.703 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:10:53.704 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:10:53.810 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:10:53.863 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:53.863 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:53.863 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:53.870 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:10:57.693 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:10:57.771 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:57.776 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:10:57.780 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 314958, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:10:58.556 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:10:58.767 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:10:58.925 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:58.925 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:58.925 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:58.977 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:10:59.041 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:59.042 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:10:59.098 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:10:59.099 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:10:59.099 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:10:59.100 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:10:59.203 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:59.203 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:59.203 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:59.204 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:59.217 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:59.217 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:59.217 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:10:59.217 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:11:02.521 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:11:02.530 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:02.534 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:11:03.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 748207, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:11:03.942 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................................ -22:11:04.366 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:11:04.366 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:04.368 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:04.368 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:11:04.479 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:04.479 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:04.532 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:04.532 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:04.533 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:04.533 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:11:04.584 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:11:04.585 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:04.589 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:11:04.590 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:11:04.647 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:04.653 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:04.653 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:04.658 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:04.718 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:11:05.788 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:11:07.219 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:11:07.224 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:07.227 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 129467, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:11:09.320 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................................... -22:11:09.661 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:11:09.669 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:09.669 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:09.670 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:09.671 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:09.675 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:09.678 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:09.678 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:09.679 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:09.731 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:09.787 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:11:09.788 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:09.789 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:09.899 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:09.956 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:11:09.957 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:11:09.958 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:09.959 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:11:10.010 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:11:11.118 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:11:13.242 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:11:13.325 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:11:13.348 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 557321, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:11:14.769 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:11:14.974 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:14.975 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:14.975 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:14.989 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:11:15.045 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:11:15.102 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:11:15.104 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:11:15.161 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:15.213 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:15.220 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:11:15.279 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:15.332 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:11:15.332 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:11:15.436 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:15.436 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:15.437 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:15.437 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:15.437 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:11:15.554 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:11:18.756 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:18.762 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:11:18.767 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:11:18.771 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 977492, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:11:20.154 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:11:20.399 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............................ -22:11:20.617 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:11:20.622 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:11:20.622 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:20.622 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:20.623 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:20.623 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:20.624 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:20.624 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:11:20.687 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:20.688 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:20.688 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:20.745 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:11:20.901 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:20.952 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:11:20.953 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:20.954 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:20.962 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:20.963 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:11:22.686 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:11:24.094 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:11:24.898 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:11:24.905 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 399353, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:11:25.636 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:11:25.808 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:11:25.808 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:11:25.917 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:11:25.971 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:11:25.973 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:11:25.977 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:25.982 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:25.988 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:25.989 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:25.989 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:11:26.042 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:26.043 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:11:26.044 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:26.044 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:26.044 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:11:26.102 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:26.105 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:26.260 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:11:26.370 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:11:27.369 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:11:28.803 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:11:30.296 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:30.300 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 803149, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:11:31.042 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................................ -22:11:31.315 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:11:31.319 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:31.323 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:31.325 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:11:31.329 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:31.329 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:11:31.483 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:11:31.588 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:31.589 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:31.591 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:11:31.591 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:31.597 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:31.597 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:11:31.599 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:11:31.599 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:11:31.651 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:31.651 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:31.652 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:31.657 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:11:32.755 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:11:33.481 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:11:34.888 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:11:35.678 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 181174, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:11:36.391 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:11:36.570 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:36.571 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:36.585 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:11:36.640 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:36.698 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:11:36.702 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:11:36.757 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:36.758 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:11:36.865 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:36.969 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:11:37.030 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:37.031 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:11:37.031 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:11:37.033 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:11:37.036 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:11:37.140 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:37.141 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:37.141 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:37.141 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:11:39.515 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:11:39.597 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:11:40.329 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:40.333 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 532640, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:11:41.712 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:11:41.952 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:11:41.961 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:42.021 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:42.022 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:42.022 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -22:11:42.181 [info] beam_mcp: refused by host authorize/1: :nope -... -22:11:42.234 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:11:42.234 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:11:42.294 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:11:42.302 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:42.302 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:11:42.409 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:11:42.411 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:42.411 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:42.411 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:42.412 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:42.412 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:42.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:11:42.470 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:11:43.539 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:11:44.949 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:45.028 [info] beam_mcp: refused by host authorize/1: :nope -... -22:11:45.744 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 966210, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:11:47.219 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -. -22:11:47.399 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:47.400 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:47.401 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:11:47.454 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:47.455 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:47.455 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:47.460 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:11:47.519 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:47.520 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:11:47.579 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:47.581 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:47.582 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:11:47.740 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:47.741 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:47.741 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:47.741 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:11:47.852 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:11:47.857 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:47.857 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...........................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:11:50.377 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:11:50.385 [info] beam_mcp: refused by host authorize/1: :nope -. -22:11:50.464 [info] beam_mcp: refused by host authorize/1: :nope -... -22:11:51.180 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 404021, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:11:52.574 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:11:52.808 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:52.808 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:52.808 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:52.809 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:11:52.862 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:11:52.863 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:52.863 [info] beam_mcp: refused by host authorize/1: :nope -... -22:11:53.028 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:11:53.084 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:53.088 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:11:53.145 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:11:53.146 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:53.146 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:11:53.204 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:11:53.316 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:53.316 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:53.316 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:11:53.318 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:11:53.378 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:11:54.335 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:11:54.393 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:11:55.802 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:11:55.806 [info] beam_mcp: refused by host authorize/1: :nope -.....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 750234, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:11:57.977 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:11:58.223 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:58.278 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:58.278 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:58.280 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:11:58.282 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:11:58.283 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:11:58.290 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:11:58.290 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:58.290 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:11:58.291 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:11:58.294 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:58.294 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................... -22:11:58.558 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:11:58.558 [info] beam_mcp: refused by host authorize/1: :nope -............. -22:11:58.661 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:11:58.714 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:11:58.721 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:11:58.721 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:11:58.727 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:11:59.707 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:11:59.709 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:12:01.902 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:12:01.911 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 135368, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:12:03.335 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:12:03.545 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:12:03.652 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:12:03.710 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:03.710 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:03.710 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:03.711 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:12:03.712 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:03.712 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:03.714 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:12:03.820 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:12:03.930 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:03.930 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:03.931 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:12:03.932 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:12:03.996 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:03.997 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:03.998 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:12:04.103 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:12:04.111 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:12:08.014 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:12:08.023 [info] beam_mcp: refused by host authorize/1: :nope -. -22:12:08.027 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:12:08.031 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 523948, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:12:08.729 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:12:09.116 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:09.116 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:09.120 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:09.125 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:09.125 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:09.127 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:12:09.128 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:12:09.128 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:09.128 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:09.129 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:09.129 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:12:09.183 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:12:09.294 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - -22:12:09.300 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:09.300 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:12:09.353 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:09.353 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:12:09.470 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:09.470 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:12:10.471 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:12:10.531 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:12:11.242 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:12:12.665 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 872930, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:12:14.051 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:12:14.385 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:12:14.491 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:14.497 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:14.501 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:14.502 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:12:14.612 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:14.613 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:14.620 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:12:14.620 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:12:14.675 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:12:14.782 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:12:14.782 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:14.783 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:14.783 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:12:14.784 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:12:14.785 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:14.786 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:12:14.845 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:14.845 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:12:16.651 [info] beam_mcp: refused by host authorize/1: :nope -. -22:12:16.654 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:12:16.658 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:12:18.065 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 276649, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:12:19.478 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:12:19.740 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:19.797 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:19.797 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:19.798 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:12:19.809 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:19.815 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:19.819 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............................. -22:12:20.079 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:20.079 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:20.079 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:20.080 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:20.080 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:12:20.086 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:12:20.089 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:20.090 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:12:20.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:12:20.194 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:12:20.246 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:20.247 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -22:12:21.985 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:12:23.393 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:12:23.399 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:12:24.112 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 616402, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:12:24.847 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:12:25.047 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:25.047 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:12:25.160 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:25.161 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:12:25.165 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:25.165 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:12:25.165 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:25.165 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:12:25.168 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:25.168 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:25.169 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:25.169 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:12:25.226 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:12:25.279 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:12:25.334 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:12:25.439 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:25.440 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:25.440 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:12:25.611 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:12:26.659 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:12:27.376 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:12:28.102 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:12:28.106 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 986691, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:12:30.175 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:12:30.393 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:12:30.500 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:12:30.556 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:30.556 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -22:12:30.616 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:30.617 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:30.669 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:30.670 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:30.670 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:30.670 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:30.670 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:12:30.724 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:30.724 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -22:12:30.779 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:12:30.784 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:12:30.787 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:12:30.791 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:30.791 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:12:30.904 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:12:31.976 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:12:34.106 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:12:34.111 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:12:34.115 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 327213, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:12:35.595 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:12:35.755 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:12:35.820 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:35.822 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:12:35.984 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:12:35.986 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:35.991 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:35.991 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:12:36.052 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:12:36.052 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:36.054 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:36.107 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:36.107 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:36.107 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:36.108 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:36.108 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:36.159 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:36.160 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:36.211 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:12:36.278 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:12:37.361 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:12:37.364 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:12:37.422 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:12:40.248 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 746461, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:12:40.958 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:12:41.172 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:12:41.185 [info] beam_mcp: refused by host authorize/1: :nope -... -22:12:41.241 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:12:41.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................. -22:12:41.454 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:12:41.455 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:12:41.509 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:12:41.617 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:41.620 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:41.627 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:41.627 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:12:41.628 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:41.628 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:41.629 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:41.629 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:41.634 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:12:41.643 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:41.643 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:12:41.695 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:12:42.769 [info] beam_mcp: refused by host authorize/1: :nope -. -22:12:42.824 [info] beam_mcp: refused by host authorize/1: :nope -. -22:12:42.828 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -...... -22:12:45.663 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 146821, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:12:46.370 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:12:46.583 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:12:46.703 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -22:12:46.869 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:46.871 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:12:46.924 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:46.929 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:46.929 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:46.929 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:46.929 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:46.929 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:46.930 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:12:46.930 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:12:47.035 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:12:47.037 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:47.037 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:12:47.088 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:12:47.089 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:47.090 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:47.099 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:12:48.218 [info] beam_mcp: refused by host authorize/1: :nope -... -22:12:49.638 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:12:49.646 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:12:49.667 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 572082, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:12:51.817 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:12:52.067 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:52.069 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:52.073 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:52.075 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:12:52.075 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -22:12:52.181 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:12:52.182 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:52.182 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:52.183 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:52.185 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:12:52.237 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:12:52.290 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:52.290 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:52.290 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:52.291 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:12:52.400 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:12:52.407 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:12:52.467 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:52.467 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:12:53.564 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:12:54.988 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:12:56.408 [info] beam_mcp: refused by host authorize/1: :nope -. -22:12:56.488 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 997403, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:12:57.230 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:12:57.429 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:57.481 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:12:57.586 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:57.587 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:12:57.587 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:57.587 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:57.588 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:57.641 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -22:12:57.642 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:12:57.646 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:12:57.698 [info] beam_mcp: refused by host authorize/1: :nope -. -22:12:57.751 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:12:57.758 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:12:57.760 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:12:57.762 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:12:57.820 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:12:57.820 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:12:57.821 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:12:57.985 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:12:58.994 [info] beam_mcp: refused by host authorize/1: :nope -... -22:12:59.712 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:13:01.130 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:01.134 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 341173, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:13:02.541 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:13:02.745 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:02.797 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:13:02.799 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:02.807 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:13:02.911 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:13:03.068 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:03.070 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:03.070 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:13:03.070 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:03.070 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:03.130 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:13:03.190 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:03.193 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:13:03.246 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:03.246 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:03.246 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:13:03.301 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:03.306 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:03.312 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:13:04.299 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:13:04.305 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:13:05.802 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:13:06.513 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 744577, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:13:07.952 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:13:08.251 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:13:08.255 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:08.260 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:08.260 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:08.260 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:08.261 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:13:08.364 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:13:08.421 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:13:08.421 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:08.422 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:08.422 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:08.422 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -22:13:08.534 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:08.540 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:08.597 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:13:08.598 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:13:08.703 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:08.704 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:08.704 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:13:10.415 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:13:10.430 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:10.488 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:13:11.897 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 119399, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:13:13.350 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:13:13.657 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:13.657 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:13:13.709 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:13:13.761 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:13.770 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:13:13.825 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:13:13.878 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:13.931 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:13.982 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:13:13.989 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:13.989 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:13:13.989 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:13.990 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:13.990 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:13:14.048 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:14.049 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:14.059 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:14.117 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:14.117 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:13:15.090 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:13:15.800 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:13:16.586 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:13:16.595 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 518591, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:13:18.755 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:13:18.930 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:13:18.930 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:13:18.986 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:13:19.046 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:19.046 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:19.158 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:19.209 [info] beam_mcp: refused by host authorize/1: :nope -... -22:13:19.263 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:19.264 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:19.264 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:13:19.316 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:19.323 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:19.326 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:19.326 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:19.384 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:13:19.444 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:19.445 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:19.498 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:13:19.499 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:13:20.517 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:13:20.592 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:20.596 [info] beam_mcp: refused by host authorize/1: :nope -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:13:23.416 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 915715, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:13:24.099 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:13:24.425 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:24.428 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:24.429 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:24.429 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:13:24.430 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:24.435 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:24.494 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:24.558 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:24.663 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:24.663 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:24.663 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:24.664 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:13:24.664 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:24.664 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:13:24.717 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:13:24.723 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:24.724 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:13:24.775 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:13:24.775 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......................... -22:13:26.572 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:13:26.587 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:26.589 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:13:28.786 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 295495, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:13:29.522 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:13:29.702 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:29.702 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:13:29.815 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:13:29.817 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:29.821 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:29.821 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:29.823 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -22:13:29.926 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:13:29.927 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:13:29.927 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:13:29.979 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:30.032 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:30.032 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:30.092 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:30.092 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:30.093 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:30.093 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:13:30.206 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:30.212 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -22:13:33.422 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:33.426 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:33.431 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:13:33.436 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 676042, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:13:34.857 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................................ -22:13:35.251 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:13:35.303 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:35.357 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:35.357 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:35.357 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:35.358 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:35.358 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:35.360 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:13:35.367 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:35.367 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:13:35.474 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:13:35.482 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:35.485 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:35.485 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:13:35.649 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:35.649 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:35.649 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:13:35.650 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:35.656 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:13:36.625 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:13:38.820 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:13:38.830 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:13:38.847 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 61851, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:13:40.275 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:13:40.543 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:40.544 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:40.596 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:13:40.760 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:13:40.760 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:13:40.868 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:40.868 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:40.919 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:13:40.980 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:40.980 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:13:40.981 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:40.981 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:40.982 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:40.994 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:40.998 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:40.998 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:13:40.999 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:41.051 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:41.051 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:13:42.005 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:13:42.727 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:13:44.134 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:13:44.193 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 41 ---- -Running ExUnit with seed: 386469, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:13:45.582 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:13:45.745 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:45.805 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:45.805 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:45.805 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:45.805 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:45.806 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:13:45.859 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:13:45.977 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:45.978 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:45.981 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:13:45.981 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:13:46.043 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:46.047 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:46.047 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:46.103 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:13:46.156 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:13:46.211 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:13:46.316 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:13:46.320 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:13:47.283 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:13:47.344 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:13:49.464 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:13:50.190 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 42 ---- -Running ExUnit with seed: 687899, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:13:50.947 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:13:51.114 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:51.119 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:13:51.335 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:51.335 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:51.335 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:51.336 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:13:51.342 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:51.400 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:51.400 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:51.400 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:51.400 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:51.402 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:51.402 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:51.454 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:13:51.510 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:13:51.515 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:51.515 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:13:51.516 [info] beam_mcp: refused by host authorize/1: :nope -............... -22:13:51.672 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:13:52.756 [info] beam_mcp: refused by host authorize/1: :nope -. -22:13:52.760 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:13:54.877 [info] beam_mcp: refused by host authorize/1: :nope -... -22:13:55.593 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 43 ---- -Running ExUnit with seed: 83253, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:13:56.273 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:13:56.489 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:56.490 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:56.490 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:13:56.613 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:56.615 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:56.616 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:13:56.617 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:13:56.617 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:13:56.672 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:13:56.726 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:13:56.781 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:13:56.788 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:13:56.788 [info] beam_mcp: refused by host authorize/1: :nope -................ -22:13:56.997 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:13:56.997 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:13:56.997 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:13:57.060 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:13:57.070 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:13:57.071 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:13:58.038 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:13:58.098 [info] beam_mcp: refused by host authorize/1: :nope -... -22:13:58.115 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:14:00.233 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 44 ---- -Running ExUnit with seed: 425051, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:14:01.641 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:14:01.873 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:01.874 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:01.874 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:01.880 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:14:01.880 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:01.893 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:14:01.894 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:14:01.953 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:14:02.013 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:02.013 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:02.013 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:02.118 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:14:02.171 [info] beam_mcp: refused by host authorize/1: :nope -. -22:14:02.222 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:14:02.275 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:02.326 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:14:02.381 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:14:02.382 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:02.390 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:14:03.420 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:14:04.196 [info] beam_mcp: refused by host authorize/1: :nope -. -22:14:04.200 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:14:06.321 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 45 ---- -Running ExUnit with seed: 831123, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:14:07.073 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:14:07.277 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:14:07.299 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:07.299 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:14:07.411 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:07.413 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:07.466 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:07.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:14:07.524 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:07.633 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:14:07.736 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:07.737 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:07.738 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:07.790 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:07.790 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:07.790 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:14:07.791 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:07.791 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:07.792 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:07.792 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................. -22:14:09.562 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:14:09.565 [info] beam_mcp: refused by host authorize/1: :nope -... -22:14:10.366 [info] beam_mcp: refused by host authorize/1: :nope -. -22:14:10.371 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 46 ---- -Running ExUnit with seed: 293013, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:14:12.506 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -22:14:12.807 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:12.811 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:12.813 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:12.813 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:14:12.967 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:14:13.020 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:13.020 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:13.024 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:14:13.134 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:13.145 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:14:13.146 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:14:13.151 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:13.151 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:13.151 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:13.152 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:13.152 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:14:13.205 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:14:13.264 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:13.268 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:14:14.291 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:14:15.699 [info] beam_mcp: refused by host authorize/1: :nope -. -22:14:15.778 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:14:17.203 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 47 ---- -Running ExUnit with seed: 697152, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:14:17.893 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:14:18.102 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:18.102 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:18.103 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:14:18.106 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:14:18.106 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:14:18.262 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:14:18.319 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:18.319 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:18.319 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:18.320 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:18.323 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:18.327 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:18.387 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:18.387 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:14:18.442 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:14:18.548 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -22:14:18.554 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:14:18.556 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:18.614 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -22:14:21.140 [info] beam_mcp: refused by host authorize/1: :nope -. -22:14:21.148 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:14:21.156 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:14:22.593 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 48 ---- -Running ExUnit with seed: 86832, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:14:23.328 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:14:23.545 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:23.546 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:23.546 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:23.546 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:14:23.608 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:23.608 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:14:23.667 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:23.668 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:14:23.668 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:23.672 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:14:23.882 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:23.882 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:23.883 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:23.883 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:14:23.883 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:14:23.992 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:23.993 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:14:24.046 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:14:24.047 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................... -22:14:25.027 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:14:25.085 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:14:25.092 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:14:25.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 49 ---- -Running ExUnit with seed: 436903, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:14:28.646 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:14:28.869 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:14:28.877 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:28.878 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:28.878 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:14:28.937 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:28.939 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:14:28.939 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:14:28.996 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:29.000 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:14:29.323 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:29.376 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:29.383 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:14:29.383 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:29.384 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:29.384 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:29.384 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:14:29.447 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:29.448 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:29.448 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:14:32.605 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:14:32.609 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:14:32.702 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:14:33.414 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 50 ---- -Running ExUnit with seed: 898469, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:14:34.100 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:14:34.316 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:34.368 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:34.369 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:34.369 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:34.377 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:14:34.437 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:34.439 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:14:34.599 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:34.652 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:34.652 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:34.653 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:34.653 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:34.655 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:14:34.655 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:14:34.708 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:34.761 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:14:34.764 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:34.768 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....................... -22:14:34.873 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:14:35.937 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:14:36.650 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:14:36.656 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:14:38.792 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 51 ---- -Running ExUnit with seed: 288251, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:14:39.533 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:14:39.710 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:39.710 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:39.711 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:14:39.872 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:14:39.873 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:14:39.924 [info] beam_mcp: refused by host authorize/1: :nope -... -22:14:39.977 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:39.981 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:40.039 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:40.040 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:40.040 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:40.040 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:14:40.041 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:14:40.106 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:40.164 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:40.164 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:14:40.170 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:40.170 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:14:40.275 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:14:42.631 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:14:42.636 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:14:43.347 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:14:44.133 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 52 ---- -Running ExUnit with seed: 622357, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:14:44.804 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:14:45.015 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:14:45.033 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:14:45.092 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:45.148 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:14:45.150 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -22:14:45.314 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:14:45.366 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:45.367 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:14:45.367 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:45.421 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:45.430 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:14:45.538 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:14:45.598 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:14:45.598 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:45.598 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:45.599 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:45.599 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:45.599 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:45.600 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:46.591 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:14:46.652 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:14:48.787 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:14:49.499 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 53 ---- -Running ExUnit with seed: 988215, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:14:50.231 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:14:50.437 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:50.437 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:14:50.438 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:50.438 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:50.438 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:50.439 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:50.496 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:50.498 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:14:50.502 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:50.503 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:50.503 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:14:50.503 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:14:50.556 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:14:50.667 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:50.668 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:50.671 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:14:50.931 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:14:50.984 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:50.993 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:51.974 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -22:14:54.110 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:14:54.191 [info] beam_mcp: refused by host authorize/1: :nope -... -22:14:54.907 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 54 ---- -Running ExUnit with seed: 403445, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:14:55.619 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:14:55.815 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:55.825 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:55.839 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:14:55.840 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:14:55.994 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:55.994 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:14:56.055 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:14:56.107 [info] beam_mcp: refused by host authorize/1: :nope -... -22:14:56.160 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:56.168 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:14:56.169 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:14:56.176 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:56.176 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:14:56.176 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:14:56.178 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:14:56.182 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:14:56.182 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:14:56.182 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:14:56.396 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:14:57.410 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:14:57.472 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -22:14:57.473 [info] beam_mcp: refused by host authorize/1: :nope -. -22:14:57.477 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:14:58.198 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 55 ---- -Running ExUnit with seed: 817437, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:15:01.027 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:15:01.227 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:15:01.287 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:01.287 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:01.288 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:15:01.342 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:15:01.343 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:01.343 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:01.343 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:01.344 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:15:01.345 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:15:01.458 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:01.465 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:15:01.466 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:15:01.571 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:01.571 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:15:01.629 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:01.629 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:01.630 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:15:01.733 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:15:02.781 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:15:04.187 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:15:04.981 [info] beam_mcp: refused by host authorize/1: :nope -... -22:15:05.707 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 56 ---- -Running ExUnit with seed: 208230, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:15:06.458 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -. -22:15:06.606 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:06.607 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:06.607 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:06.608 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:15:06.669 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:06.669 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:15:06.775 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:06.778 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:15:06.778 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:15:06.889 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:15:06.942 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:06.942 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:06.943 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:15:07.003 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:07.056 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:07.063 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:07.066 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:15:07.067 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:07.069 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:15:08.126 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:15:08.131 [info] beam_mcp: refused by host authorize/1: :nope -.....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:15:11.042 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:15:11.051 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 57 ---- -Running ExUnit with seed: 555597, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:15:11.789 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:15:11.933 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:15:12.002 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:12.003 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:15:12.004 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:12.004 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:15:12.005 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:15:12.007 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:12.011 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:15:12.064 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:15:12.123 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:12.124 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:12.176 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:12.176 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:12.177 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:12.177 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:12.177 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............................... -22:15:12.337 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:15:12.337 [info] beam_mcp: refused by host authorize/1: :nope -. -22:15:12.396 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:15:14.201 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:15:16.326 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:15:16.330 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:15:16.415 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 58 ---- -Running ExUnit with seed: 905865, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:15:17.123 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:15:17.305 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:15:17.314 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:15:17.327 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:17.335 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:17.335 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:15:17.344 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:15:17.449 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:17.449 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:17.449 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:17.450 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:15:17.500 [info] beam_mcp: refused by host authorize/1: :nope -. -22:15:17.553 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:17.556 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:15:17.607 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:15:17.608 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:17.608 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:17.611 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:15:17.722 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:15:17.884 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:15:20.307 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:15:20.310 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:15:21.724 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:15:21.802 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 59 ---- -Running ExUnit with seed: 302713, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:15:22.461 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:15:22.798 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:15:22.850 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:15:22.901 [info] beam_mcp: refused by host authorize/1: :nope -................. -22:15:23.068 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:23.121 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:23.121 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:23.122 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:23.124 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:15:23.127 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -22:15:23.127 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:23.127 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:23.128 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:15:23.181 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:15:23.189 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:15:23.194 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:23.194 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:15:23.197 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:23.199 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:23.200 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:15:25.017 [info] beam_mcp: refused by host authorize/1: :nope -. -22:15:25.023 [info] beam_mcp: refused by host authorize/1: :nope -. -22:15:25.026 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:15:25.028 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -......http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 60 ---- -Running ExUnit with seed: 657304, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:15:27.897 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:15:28.088 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:28.098 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:15:28.099 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:28.099 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:28.099 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:28.100 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:15:28.108 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:28.109 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:15:28.218 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:28.219 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:28.220 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:15:28.223 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:15:28.335 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:15:28.388 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:15:28.388 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:15:28.493 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:28.494 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:15:28.499 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:28.500 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................. -22:15:29.662 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:15:29.731 [info] beam_mcp: refused by host authorize/1: :nope -. -22:15:29.735 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:15:30.446 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 61 ---- -Running ExUnit with seed: 71104, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:15:33.309 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:15:33.519 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:33.520 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:15:33.577 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:15:33.632 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:33.632 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:33.633 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:15:33.639 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:33.640 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:15:33.694 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:33.701 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:15:33.706 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:15:33.817 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:33.817 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:15:33.922 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:15:34.027 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:15:34.088 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:34.089 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:34.089 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:15:34.092 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:15:35.101 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:15:35.106 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:15:37.237 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:15:37.319 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 62 ---- -Running ExUnit with seed: 529850, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:15:38.710 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:15:39.059 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:39.061 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:39.062 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:39.063 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:15:39.066 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:15:39.118 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:39.118 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:39.119 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:15:39.125 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:39.125 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:15:39.127 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:39.132 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:39.132 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:39.133 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:39.133 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:15:39.242 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:15:39.350 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:15:39.461 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:39.461 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:15:40.573 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:15:40.582 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:15:43.403 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:15:43.412 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 63 ---- -Running ExUnit with seed: 937023, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:15:44.177 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:15:44.356 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:15:44.370 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:44.371 [info] beam_mcp: refused by host authorize/1: :nope -. -22:15:44.426 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:15:44.433 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:44.434 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:15:44.434 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:15:44.547 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:44.547 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:15:44.658 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:44.658 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:44.659 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:15:44.712 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:15:44.823 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:44.828 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:44.829 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:15:44.884 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:44.884 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:44.885 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:15:45.933 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:15:45.995 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:15:46.704 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:15:46.710 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 64 ---- -Running ExUnit with seed: 347664, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:15:49.610 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:15:49.800 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:15:49.866 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:15:49.920 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:49.922 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:15:49.926 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:49.929 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:49.982 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:49.983 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:49.983 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:15:49.983 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:49.983 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:49.984 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:15:50.035 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:15:50.157 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:15:50.158 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:50.158 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:15:50.211 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:15:50.220 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:15:50.380 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:15:51.400 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:15:51.406 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:15:51.411 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:15:54.311 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (1.0s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 65 ---- -Running ExUnit with seed: 834278, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:15:55.074 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -22:15:55.233 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:55.233 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:15:55.250 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:15:55.262 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:55.262 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:15:55.423 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:15:55.425 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:15:55.480 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:15:55.538 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:55.538 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:15:55.539 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:55.591 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:15:55.645 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:15:55.646 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:55.646 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:15:55.646 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:15:55.646 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:15:55.652 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:15:55.704 [info] beam_mcp: refused by host authorize/1: :nope -................ -22:15:56.811 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:15:56.880 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:15:58.286 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:15:59.706 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 66 ---- -Running ExUnit with seed: 201496, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:16:00.392 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:16:00.611 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:16:00.730 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:16:00.786 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:00.786 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:00.840 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:16:00.841 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:00.842 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:00.842 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:00.947 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:16:00.948 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:16:01.004 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:16:01.005 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:16:01.005 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:16:01.115 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:16:01.173 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:01.176 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:01.176 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:01.177 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:01.177 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:16:02.132 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:16:03.637 [info] beam_mcp: refused by host authorize/1: :nope -. -22:16:03.646 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:16:05.054 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 67 ---- -Running ExUnit with seed: 547810, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:16:05.798 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:16:06.000 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:16:06.055 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:16:06.056 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:06.057 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:06.058 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:06.058 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:06.058 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:06.058 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:06.059 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:16:06.060 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:06.060 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:16:06.065 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:06.070 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:06.070 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:06.074 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:16:06.236 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:16:06.288 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:06.291 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:06.292 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............................... -22:16:08.186 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:16:08.200 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:16:09.606 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:16:10.399 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 68 ---- -Running ExUnit with seed: 894783, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:16:11.058 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:16:11.305 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:11.317 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:16:11.431 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:11.534 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:16:11.637 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:11.638 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:11.638 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:11.638 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:11.643 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:11.644 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:16:11.644 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:11.644 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:11.644 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:11.647 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:16:11.701 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:11.701 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:16:11.769 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:11.769 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:16:11.826 [info] beam_mcp: refused by host authorize/1: :nope -................. -22:16:12.907 [info] beam_mcp: refused by host authorize/1: :nope -. -22:16:12.912 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:16:14.337 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:16:14.344 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 69 ---- -Running ExUnit with seed: 255983, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:16:16.459 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:16:16.780 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:16.790 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:16:16.842 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:16.842 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:16:16.843 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:16.843 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:16:16.845 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:16:16.896 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:16:16.897 [info] beam_mcp: refused by host authorize/1: :nope -................... -22:16:17.009 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:16:17.114 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:17.168 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:16:17.169 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:17.170 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:17.170 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:17.170 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:17.170 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:16:17.231 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:17.231 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:16:18.332 [info] beam_mcp: refused by host authorize/1: :nope -. -22:16:18.339 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:16:18.354 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -..... -22:16:21.179 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 70 ---- -Running ExUnit with seed: 683443, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:16:21.954 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:16:22.114 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:16:22.229 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:22.231 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:16:22.232 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:16:22.232 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....................... -22:16:22.343 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:16:22.402 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:22.403 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:22.403 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:22.403 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:16:22.514 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:16:22.572 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:22.578 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:16:22.632 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:22.632 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:22.640 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:22.641 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:22.641 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:22.641 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.........http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:16:23.709 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:16:24.476 [info] beam_mcp: refused by host authorize/1: :nope -... -22:16:25.897 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:16:26.608 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 71 ---- -Running ExUnit with seed: 110351, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:16:27.301 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:16:27.582 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:27.583 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:16:27.693 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:27.696 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:27.697 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:16:27.748 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:16:27.807 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:27.859 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:27.859 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:27.865 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:27.866 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:27.866 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:27.866 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:16:27.874 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:16:27.984 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:28.038 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:28.038 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:16:28.093 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:16:28.093 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:16:29.165 [info] beam_mcp: refused by host authorize/1: :nope -... -22:16:30.578 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:16:30.581 [info] beam_mcp: refused by host authorize/1: :nope -. -22:16:30.585 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 72 ---- -Running ExUnit with seed: 504285, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:16:32.772 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:16:32.937 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:32.941 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:33.000 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:33.001 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:16:33.005 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:33.005 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:16:33.058 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:33.059 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:33.059 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:33.059 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:16:33.165 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:33.165 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:16:33.171 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:33.225 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:16:33.226 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:16:33.279 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:16:33.333 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:16:33.334 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:16:33.385 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......................... -22:16:34.550 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:16:34.609 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:16:37.431 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:16:37.435 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 73 ---- -Running ExUnit with seed: 928572, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:16:38.154 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:16:38.363 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:16:38.423 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:38.476 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:38.480 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:16:38.532 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:16:38.533 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:38.533 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:38.533 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:16:38.594 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:16:38.648 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:38.707 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:16:38.760 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:16:38.873 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:38.874 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:16:38.883 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:38.883 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:38.883 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:38.884 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:16:38.935 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:16:40.004 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:16:40.019 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:16:42.845 [info] beam_mcp: refused by host authorize/1: :nope -. -22:16:42.849 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 74 ---- -Running ExUnit with seed: 323577, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:16:43.507 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:16:43.738 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:16:43.794 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:43.794 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:16:43.898 [info] beam_mcp: refused by host authorize/1: :nope -... -22:16:43.949 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:43.949 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:16:44.062 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:44.063 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:44.120 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:16:44.121 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:44.127 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:16:44.233 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:44.233 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:44.234 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:44.234 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:44.240 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:16:44.241 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:16:44.245 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:44.297 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................... -22:16:45.345 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:16:45.361 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:16:45.363 [info] beam_mcp: refused by host authorize/1: :nope -......http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:16:48.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 75 ---- -Running ExUnit with seed: 680104, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:16:48.940 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:16:49.108 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:16:49.121 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:49.122 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:49.122 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:16:49.124 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:16:49.233 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:49.234 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:16:49.234 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:16:49.287 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:49.287 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:49.292 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:16:49.410 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:49.462 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:16:49.567 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:16:49.571 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:16:49.577 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:49.629 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:16:49.682 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:49.682 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:16:50.687 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:16:50.745 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:16:50.756 [info] beam_mcp: refused by host authorize/1: :nope -. -22:16:50.759 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 76 ---- -Running ExUnit with seed: 82371, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:16:54.266 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:16:54.497 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:16:54.551 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:16:54.556 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:54.556 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:16:54.556 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:16:54.559 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:16:54.666 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:16:54.733 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:16:54.785 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:16:54.840 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:54.840 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:16:54.840 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:16:54.959 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:16:55.012 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:16:55.012 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:16:55.017 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:55.017 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:16:55.017 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:16:55.069 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:16:56.786 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:16:57.496 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:16:57.588 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:16:59.002 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 77 ---- -Running ExUnit with seed: 498961, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:16:59.677 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:17:00.005 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:17:00.011 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:00.012 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:00.012 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:00.013 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:00.013 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:00.117 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:17:00.123 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:17:00.237 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:00.296 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:00.297 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:17:00.399 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:00.399 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:00.400 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:00.456 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:17:00.457 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:00.461 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:00.461 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:00.513 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:17:01.510 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...... -22:17:03.020 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:17:04.428 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:04.433 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 78 ---- -Running ExUnit with seed: 933541, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:17:05.199 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:17:05.365 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:17:05.532 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:05.537 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:05.537 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:05.592 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:05.592 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:17:05.651 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:05.651 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:05.755 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:17:05.807 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:17:05.808 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:05.808 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:05.808 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:05.809 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:05.809 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:17:05.813 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:05.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:17:05.814 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:05.926 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:17:08.425 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:17:08.443 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:17:08.447 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:08.451 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 79 ---- -Running ExUnit with seed: 371626, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:17:10.597 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:17:10.833 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:17:10.892 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:10.892 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:10.892 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:17:11.005 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:11.009 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:11.062 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:11.120 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...................... -22:17:11.276 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:17:11.277 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:17:11.283 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:11.284 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:17:11.337 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:11.337 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:11.347 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:11.350 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:11.355 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:11.355 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:11.356 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:17:12.363 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:12.369 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:12.427 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:17:13.861 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 80 ---- -Running ExUnit with seed: 769564, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:17:15.954 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:17:16.171 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:16.229 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:16.232 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:17:16.233 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:17:16.289 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:16.294 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:16.294 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:17:16.347 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:16.406 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:16.406 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:16.413 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:16.465 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:17:16.467 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:16.474 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:16.474 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:16.474 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:16.474 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:17:16.526 [info] beam_mcp: refused by host authorize/1: :nope -................... -22:17:16.735 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:17:20.577 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:20.586 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:20.589 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:17:20.669 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 81 ---- -Running ExUnit with seed: 158635, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:17:21.365 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:17:21.563 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:17:21.623 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -22:17:21.681 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:17:21.690 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:21.690 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:21.691 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:21.691 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:21.691 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:21.694 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:17:21.695 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:21.696 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:21.696 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:21.698 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:21.698 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:21.699 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:21.911 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:21.911 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:17:22.066 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:17:22.067 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.........http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:17:25.212 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:17:25.307 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:25.312 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:17:25.321 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 82 ---- -Running ExUnit with seed: 526867, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:17:26.743 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:17:26.949 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:26.950 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:26.950 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:26.951 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:27.062 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:17:27.063 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:17:27.114 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:27.114 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:27.114 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:17:27.167 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:27.177 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:27.181 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:17:27.241 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:27.241 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:27.241 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:17:27.399 [info] beam_mcp: refused by host authorize/1: :nope -... -22:17:27.452 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:17:27.460 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:17:27.512 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:29.962 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:17:31.370 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:31.374 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:17:31.457 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 83 ---- -Running ExUnit with seed: 956959, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:17:32.189 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -22:17:32.362 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:17:32.362 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:17:32.415 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:32.467 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:32.467 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:17:32.574 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:17:32.630 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:32.683 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:17:32.746 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:32.746 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:17:32.747 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:32.749 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:17:32.753 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:32.805 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:17:32.806 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:32.807 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:32.807 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:17:32.814 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:32.933 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:33.931 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:17:34.696 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:34.699 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:34.702 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 84 ---- -Running ExUnit with seed: 337641, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:17:37.522 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:17:37.859 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:37.859 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:37.860 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:17:37.865 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:37.865 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:37.866 [info] beam_mcp: refused by host authorize/1: :nope -. -22:17:37.917 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:37.920 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:17:37.980 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:17:37.981 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:37.981 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:17:38.036 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:38.037 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:17:38.096 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:38.100 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:38.100 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:17:38.153 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:17:38.156 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:17:38.311 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:17:40.006 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:40.720 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:17:40.729 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:17:42.228 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 85 ---- -Running ExUnit with seed: 734228, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:17:42.935 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:17:43.165 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:43.171 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:43.223 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:17:43.336 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:43.340 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:17:43.397 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:17:43.398 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:17:43.505 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:17:43.613 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:43.613 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:43.614 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:17:43.666 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:43.667 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:43.668 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:43.668 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:43.668 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:17:43.676 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:43.677 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:43.677 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:17:44.716 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:17:45.429 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:17:46.154 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:17:46.239 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 86 ---- -Running ExUnit with seed: 152086, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:17:48.396 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:17:48.579 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:17:48.695 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:48.700 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:17:48.700 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:48.701 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:48.701 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:48.701 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:17:48.701 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:48.755 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:17:48.810 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:17:48.862 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:17:48.922 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:48.925 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:48.926 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:48.985 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:48.986 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:48.986 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:49.090 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -22:17:49.155 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:52.276 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:17:52.281 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:17:52.364 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:17:53.076 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 87 ---- -Running ExUnit with seed: 610949, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:17:53.852 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:17:54.185 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:54.187 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:54.188 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:54.188 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:54.189 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:17:54.191 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:17:54.191 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -22:17:54.204 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:54.207 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:17:54.314 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:17:54.314 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:17:54.314 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:54.315 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:17:54.475 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:17:54.534 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:54.536 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:17:54.589 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:54.589 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:54.589 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:17:55.581 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:17:55.586 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:17:58.407 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:17:58.488 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 88 ---- -Running ExUnit with seed: 987847, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:17:59.148 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:17:59.389 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:17:59.450 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:17:59.450 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:17:59.451 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:17:59.504 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:59.504 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:17:59.558 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:59.559 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:17:59.618 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:17:59.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:17:59.676 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:59.678 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:59.678 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:17:59.678 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:17:59.679 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:17:59.679 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:17:59.836 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:17:59.841 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:17:59.845 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:18:03.020 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:18:03.741 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:03.820 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:03.825 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 89 ---- -Running ExUnit with seed: 307875, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:18:04.517 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:18:04.715 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:18:04.822 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:18:04.879 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:04.879 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:04.884 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:18:04.937 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:04.938 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:04.938 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:04.940 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:04.942 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:18:04.942 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:04.942 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:04.946 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:18:04.954 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:18:04.958 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:18:04.959 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:18:05.165 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:18:05.218 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:05.271 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:18:06.296 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:18:06.306 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:18:08.515 [info] beam_mcp: refused by host authorize/1: :nope -... -22:18:09.233 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 90 ---- -Running ExUnit with seed: 736786, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:18:09.950 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:18:10.159 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:10.218 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:10.218 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:10.224 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:10.277 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:10.277 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:18:10.385 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:18:10.386 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:18:10.438 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:10.490 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:10.490 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:10.496 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:18:10.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:18:10.669 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:18:10.672 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:10.672 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:10.672 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:10.728 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:10.728 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....................http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:18:11.785 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:11.791 [info] beam_mcp: refused by host authorize/1: :nope -... -22:18:13.200 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:18:13.927 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 91 ---- -Running ExUnit with seed: 133347, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:18:15.344 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:18:15.555 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:15.556 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:15.556 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:15.556 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:15.556 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:18:15.612 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:18:15.724 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:18:15.892 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:15.893 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:18:15.893 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:18:15.894 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:15.894 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:15.998 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:16.005 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:18:16.058 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:16.059 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:18:16.069 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:18:16.074 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:16.075 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:18:18.558 [info] beam_mcp: refused by host authorize/1: :nope -... -22:18:20.046 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:20.052 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:18:20.073 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 92 ---- -Running ExUnit with seed: 573413, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:18:20.779 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:18:20.959 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:18:21.013 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:21.070 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:21.070 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:21.074 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:18:21.076 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:18:21.137 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:21.137 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:18:21.191 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:21.191 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:18:21.249 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:18:21.362 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:18:21.415 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:18:21.469 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:21.469 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:21.470 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:21.470 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:18:21.531 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:21.531 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..........http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:18:23.945 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:18:23.951 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:18:24.031 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:18:25.458 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 93 ---- -Running ExUnit with seed: 964730, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:18:26.198 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:18:26.442 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:18:26.442 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:18:26.494 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:26.496 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:26.504 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:26.508 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:26.510 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:18:26.562 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:26.562 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:26.563 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:26.618 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:26.618 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:18:26.620 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:18:26.620 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:26.724 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:26.730 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:26.784 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:26.784 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:18:26.896 [info] beam_mcp: refused by host authorize/1: :nope -..........http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:18:27.947 [info] beam_mcp: refused by host authorize/1: :nope -... -22:18:27.964 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:18:30.787 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:18:30.791 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 4.7 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 94 ---- -Running ExUnit with seed: 287332, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:18:31.469 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -22:18:31.745 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:18:31.745 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:18:31.750 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:31.750 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:31.801 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:18:31.853 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:18:31.958 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:31.958 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:31.963 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:18:32.075 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:32.076 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:32.076 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:32.080 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:18:32.081 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:32.081 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:32.081 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:32.081 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:18:32.134 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -22:18:32.257 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:18:33.232 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:18:34.000 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:18:36.117 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:18:36.121 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 95 ---- -Running ExUnit with seed: 627715, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:18:36.882 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -22:18:37.062 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:37.062 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:18:37.116 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:18:37.173 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:18:37.175 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:18:37.228 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:37.235 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:37.237 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:18:37.247 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:37.248 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:18:37.352 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:37.353 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:37.353 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:37.353 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:37.456 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:18:37.465 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:37.466 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:18:37.572 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:37.572 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:18:38.584 [info] beam_mcp: refused by host authorize/1: :nope -... -22:18:40.003 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:18:40.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:18:41.489 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 4.8 seconds (0.9s async, 3.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 96 ---- -Running ExUnit with seed: 997419, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:18:42.227 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:18:42.420 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:42.420 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:42.421 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:42.421 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:42.424 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:42.433 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:42.440 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:18:42.651 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:42.657 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:18:42.657 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:42.658 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:18:42.710 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:42.710 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:42.714 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:18:42.714 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:18:42.778 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:18:42.831 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -22:18:42.987 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:18:42.995 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:18:44.056 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:18:46.175 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:18:46.887 [info] beam_mcp: refused by host authorize/1: :nope -... -22:18:46.908 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 97 ---- -Running ExUnit with seed: 388574, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:18:47.628 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:18:47.857 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:47.857 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:47.860 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:18:47.862 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:47.866 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:47.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:18:47.923 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:18:47.923 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:47.923 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:47.924 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:48.038 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:48.038 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:48.039 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:18:48.097 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:48.154 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:48.265 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:18:48.370 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:48.371 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:18:48.371 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:18:49.382 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:18:50.812 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:18:50.816 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:50.895 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 4.9 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 98 ---- -Running ExUnit with seed: 807780, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:18:53.013 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:18:53.233 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:18:53.236 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:53.236 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:18:53.288 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:53.345 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:18:53.405 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:53.408 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:18:53.463 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:53.469 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:53.469 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:18:53.470 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:53.470 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:53.470 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:18:53.576 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:53.577 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:18:53.582 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:18:53.634 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:18:53.634 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:18:53.742 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:18:55.506 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:18:57.620 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:18:57.704 [info] beam_mcp: refused by host authorize/1: :nope -. -22:18:57.708 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 99 ---- -Running ExUnit with seed: 222168, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:18:58.423 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................................. -22:18:58.610 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:18:58.715 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:18:58.717 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:18:58.771 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:58.771 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:58.771 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:58.779 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:58.887 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:58.940 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:18:58.940 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:18:58.995 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:18:59.109 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:59.113 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:18:59.113 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:18:59.113 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:18:59.115 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:18:59.122 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:18:59.122 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:18:59.176 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...........http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:19:00.913 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:00.917 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:19:03.120 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:19:03.129 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 100 ---- -Running ExUnit with seed: 632211, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:19:03.830 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:19:04.052 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:19:04.065 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:19:04.067 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:04.069 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:04.069 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:04.175 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:19:04.284 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:04.336 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:19:04.444 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:04.445 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:19:04.452 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:19:04.556 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:19:04.561 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:19:04.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:19:04.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:19:04.564 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:04.564 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:19:04.564 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:19:04.565 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:19:07.720 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:19:07.799 [info] beam_mcp: refused by host authorize/1: :nope -. -22:19:07.803 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:19:07.811 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 4.8 seconds (0.9s async, 3.9s sync) -162 tests, 0 failures -RUN_EXIT=0 - -== green-rate-mc8-idle: 0 run(s) of 100 exited non-zero == diff --git a/slices/006-harness-honesty/logs/green-rate-mc8-load32-round2.txt b/slices/006-harness-honesty/logs/green-rate-mc8-load32-round2.txt deleted file mode 100644 index eb8dd946..00000000 --- a/slices/006-harness-honesty/logs/green-rate-mc8-load32-round2.txt +++ /dev/null @@ -1,10167 +0,0 @@ -== CORRECTION TO THE PROVENANCE NOTE BELOW -- ADDED 2026-09-08, AFTER IT == - -Appended, not edited. The note below stands as written; this block supersedes ONE of its claims. - -THE BIRTH-TIMESTAMP EVIDENCE IT CITES NO LONGER EXISTS, AND ADDING THAT NOTE IS WHAT DESTROYED -IT. The note argues this file is the clean re-run because the four *-round2 archives carry -births forming "an unbroken serial chain". Measured now: - - $ TZ=UTC stat -c '%wZ %yZ' - green-mutation-under-load-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc64-idle-round2.txt birth 13:36:56 mtime 13:36:56 - green-rate-mc8-load32-round2.txt birth 13:36:56 mtime 13:36:56 - -All four share one birth, to the millisecond, and birth equals mtime -- the signature of a -wholesale rewrite. Prepending the note rewrote each file and reset the timestamp the note -offers as its proof. The archive that was cited as evidence was consumed by the act of citing -it. That is this slice's own subject, one level up. - -WHAT SURVIVES, AND ITS LIMIT. The `date:` lines below the note's end marker are the driver's own -output and are sequential -- 12:23:53Z, 12:30:22Z, 12:39:18Z, 12:48:16Z -- so the four archives -come from one serial driver run. What that CANNOT establish on its own is that no interference -overlapped its opening minutes, because the independent filesystem corroboration is gone. The -contaminated driver's files are deleted, so its 12:14:39Z births cannot be re-checked either. - -STATED RATHER THAN RESOLVED: this file is PROBABLY the clean re-run and the internal dates -support it, but the evidence originally offered for saying so does not hold, and no later -quiet-machine scoring table exists to cite instead -- `mutation-harness-anchors-round2.txt` is -EARLIER (12:06:42Z), not later. Recorded in FINDINGS.md under Round 2 rather than argued away. - -== END OF CORRECTION == - -== PROVENANCE NOTE -- ADDED BY HAND, AFTER THIS FILE WAS WRITTEN == - -This note is not command output and does not come from the run below. It was typed into the -top of this file after the run had finished and the file had been written. Everything below -the marker line that ends this note is the driver's own output, unaltered, byte for byte; not -one existing byte of it was edited to add this. - -WHY IT EXISTS. This filename was used twice. The FIRST run was interrupted: while its scoring -loop was live, a reviewer ran - - git checkout -- lib/beam_mcp/transport/http.ex - -against this worktree, plus two `mix test` alongside it. A mutant scored against unmutated code -reads as a SURVIVOR and is really a kill -- the direction of error this slice exists to remove --- and which row was corrupted is not recoverable by inspection. That run was therefore -DISCARDED IN FULL and its files DELETED rather than repaired. A 100-run rate archive from the -same driver, whose header line read `background load: 0` while busy loops were still running, -was discarded and deleted with it. - -THIS FILE IS THE CLEAN RE-RUN. IT IS NOT THE DISCARDED RUN. The evidence is the birth -timestamps of the four *-round2 archives, which form an unbroken serial chain written by one -driver, each beginning exactly when the previous one ends: - - green-mutation-under-load-round2.txt birth 2026-09-08T12:23:53Z - green-rate-mc8-idle-round2.txt birth 2026-09-08T12:30:22Z - green-rate-mc64-idle-round2.txt birth 2026-09-08T12:39:18Z - green-rate-mc8-load32-round2.txt birth 2026-09-08T12:48:16Z - -The contaminated driver's files were born 2026-09-08T12:14:39Z, and its mutation archive was -deleted at about 12:15Z -- before this re-run began. No file carrying one of the four births -above can be part of the discarded run. - -== END OF HAND-ADDED NOTE -- EVERYTHING BELOW THIS LINE IS UNTOUCHED COMMAND OUTPUT == - -== green-rate-mc8-load32-round2 == -command: mix test --max-cases 8 (x40 consecutive runs) -background load: 32 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: eff906ca76c6ce59d86c46018e376195ce150efd dirty=12 -date: 2026-09-08T12:48:16Z - ----- run 1 ---- -Running ExUnit with seed: 961418, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:48:18.717 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:48:19.441 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:48:19.496 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:48:19.527 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:48:19.578 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:48:19.579 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:48:19.643 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:48:19.715 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:48:19.817 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:48:19.919 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:19.919 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:19.920 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:19.934 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:48:19.946 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:19.946 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:19.946 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:19.947 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -08:48:19.963 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:19.963 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:48:20.014 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:48:23.218 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:48:23.946 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:48:25.355 [info] beam_mcp: refused by host authorize/1: :nope -. -08:48:25.363 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 7.2 seconds (1.9s async, 5.3s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 849163, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -08:48:27.718 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:48:28.498 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:28.498 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:48:28.583 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:28.599 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:28.599 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:48:28.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:48:28.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:48:28.767 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:28.767 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:48:28.771 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:48:28.786 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:28.790 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:28.790 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:28.793 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:48:28.803 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:28.803 [info] beam_mcp: refused by host authorize/1: :nope -............................ -08:48:29.132 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:29.132 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:29.132 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -08:48:31.876 [info] beam_mcp: refused by host authorize/1: :nope -... -08:48:31.911 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:48:34.772 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:48:34.783 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 7.7 seconds (2.1s async, 5.6s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 416347, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:48:37.176 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:48:37.916 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -08:48:38.009 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:38.009 [info] beam_mcp: refused by host authorize/1: :nope -... -08:48:38.075 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:48:38.076 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:38.076 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:38.077 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:48:38.101 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:38.109 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:48:38.109 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................. -08:48:38.300 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:48:38.366 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:48:38.420 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:48:38.420 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:38.421 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -08:48:38.473 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:38.473 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:38.474 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:48:38.576 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:48:41.639 [info] beam_mcp: refused by host authorize/1: :nope -. -08:48:41.649 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:48:41.684 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....... -08:48:44.704 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 8.0 seconds (1.9s async, 6.1s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 205362, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:48:47.013 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:48:47.834 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:48:47.857 [info] beam_mcp: refused by host authorize/1: :nope -......... -08:48:47.939 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:47.940 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:47.940 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:48:47.947 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:48:47.949 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:48:48.051 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:48:48.056 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:48.056 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:48.056 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:48:48.117 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:48.143 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:48:48.201 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:48:48.304 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:48:48.370 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:48:48.473 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - -08:48:48.473 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -08:48:48.490 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:48:50.787 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:48:53.096 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:48:53.100 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:48:53.100 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:48:53.101 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:48:53.101 [info] beam_mcp: refused by host authorize/1: :nope - -08:48:53.109 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:550 - ** (RuntimeError) 5 exchange(s) in a row were aborted before a measurement existed. The last ended (:econnreset) after 0 complete response(s) out of 1, having read 0 byte(s): "" - - One aborted exchange is a lost segment and is repeated. 5 of them is not, and it is reported here rather than turned into an assertion about bytes nobody received. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:228: BeamMCP.Transport.HTTPBanditTest.exchange/4 - test/beam_mcp/transport/http_bandit_test.exs:564: (test) - -.... -08:48:53.148 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 7.4 seconds (2.0s async, 5.3s sync) -164 tests, 1 failure -RUN_EXIT=2 ----- run 5 ---- -Running ExUnit with seed: 281159, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:48:55.936 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:48:56.902 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:48:56.955 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:56.955 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:56.955 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:56.965 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:48:56.970 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -08:48:56.973 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:48:56.976 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:48:57.027 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:48:57.051 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:57.061 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:48:57.080 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:48:57.145 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:48:57.145 [info] beam_mcp: refused by host authorize/1: :nope -... -08:48:57.209 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:48:57.272 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:48:57.273 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:48:57.429 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:48:57.480 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:49:00.496 [info] beam_mcp: refused by host authorize/1: :nope -. -08:49:00.509 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:49:00.515 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:49:02.664 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 7.2 seconds (2.0s async, 5.1s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 166263, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -08:49:04.995 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:49:05.467 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:49:05.513 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:05.514 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:05.532 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:49:05.600 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:49:05.727 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:49:05.732 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:49:05.740 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:49:05.791 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:49:05.792 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:05.792 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:49:05.843 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:49:06.022 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:49:06.030 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:06.030 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:06.031 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:49:06.032 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:06.032 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:49:06.089 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:49:08.474 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:49:08.503 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:49:08.682 [info] beam_mcp: refused by host authorize/1: :nope -... -08:49:08.695 [info] beam_mcp: refused by host authorize/1: :nope -...... -Finished in 7.1 seconds (1.7s async, 5.4s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 36548, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:49:13.772 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -08:49:14.310 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:49:14.311 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:49:14.358 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:49:14.598 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:49:14.740 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:49:14.912 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:49:14.964 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:14.964 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:14.964 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:15.068 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:49:15.097 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:15.098 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................... -08:49:15.153 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:15.154 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:49:15.154 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:49:15.220 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:15.238 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:49:15.239 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:15.239 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -08:49:17.637 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:49:18.540 [info] beam_mcp: refused by host authorize/1: :nope -... -08:49:18.561 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:49:20.703 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.4 seconds (2.0s async, 5.4s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 256057, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:49:22.966 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -08:49:23.758 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:49:23.839 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:23.839 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:23.840 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:23.840 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:49:23.894 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:49:23.949 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:49:24.003 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:49:24.015 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:24.020 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:49:24.151 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:49:24.184 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:24.184 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:49:24.286 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:49:24.286 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:24.287 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:49:24.287 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:24.302 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:49:24.407 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:49:26.972 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:49:26.998 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:49:27.108 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:49:28.562 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 7.5 seconds (1.9s async, 5.5s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 599164, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:49:32.315 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -08:49:32.862 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:49:33.098 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:33.099 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:33.099 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:33.152 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:49:33.209 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:33.209 [info] beam_mcp: refused by host authorize/1: :nope -... -08:49:33.261 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:49:33.261 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:49:33.317 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:49:33.368 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:33.369 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:49:33.420 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:49:33.421 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:33.421 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:49:33.508 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:49:33.509 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:49:33.546 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:33.579 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:49:36.177 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:49:38.313 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:49:38.485 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:49:39.210 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 7.3 seconds (1.7s async, 5.6s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 702174, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:49:41.417 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -08:49:42.424 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:49:42.425 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:42.426 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:49:42.493 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:49:42.494 [info] beam_mcp: refused by host authorize/1: :nope -... -08:49:42.545 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:49:42.614 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:49:42.647 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:42.647 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -08:49:42.790 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:42.791 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:42.791 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:49:42.792 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:49:42.793 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:49:42.797 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:49:42.797 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:49:42.859 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:42.860 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:49:42.861 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:49:45.425 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:49:45.455 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:49:45.468 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:49:46.931 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 7.4 seconds (1.9s async, 5.4s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 896155, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:49:50.564 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -08:49:51.373 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:49:51.453 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:49:51.480 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:49:51.637 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:49:51.708 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:51.708 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:51.709 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:51.709 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:51.709 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:49:51.711 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:49:51.864 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:49:51.918 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:49:51.936 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:49:51.956 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:51.982 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:49:52.034 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:52.034 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:49:52.035 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:49:52.056 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:49:55.528 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:49:55.540 [info] beam_mcp: refused by host authorize/1: :nope -. -08:49:55.549 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:49:57.839 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.7 seconds (1.9s async, 5.7s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 344513, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -08:49:59.981 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -08:50:00.677 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:50:00.802 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -08:50:00.990 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:00.990 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:00.990 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:00.991 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:00.991 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:00.991 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -08:50:01.114 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:01.128 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:01.128 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:50:01.132 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:50:01.152 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:50:01.155 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:01.155 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:50:01.156 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -08:50:01.161 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:01.192 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:50:01.294 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:50:04.467 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:50:04.522 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:50:04.534 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:50:06.662 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.1 seconds (1.8s async, 5.3s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 159156, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -08:50:08.983 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -08:50:09.695 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:09.730 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:50:09.784 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:09.785 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:09.785 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:50:09.856 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:50:09.892 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:09.893 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:09.894 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:09.894 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:09.946 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:50:10.015 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:10.015 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:50:10.176 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:50:10.347 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:10.360 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:50:10.363 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:50:10.414 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:10.415 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:50:14.641 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:50:14.648 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:50:15.535 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:50:15.538 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:50:15.549 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.2 seconds (2.0s async, 5.1s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 51688, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:50:17.777 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:50:18.643 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:18.643 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:18.644 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:18.644 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:18.697 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..................... -08:50:18.916 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:50:18.919 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:50:18.929 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:50:18.944 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:18.956 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:19.007 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:50:19.010 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:50:19.064 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:19.065 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:50:19.167 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:19.183 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:50:19.245 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:50:19.249 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:50:19.249 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:50:22.074 [info] beam_mcp: refused by host authorize/1: :nope -... -08:50:22.835 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -08:50:24.978 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:50:24.987 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.7 seconds (2.0s async, 5.6s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 430158, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -08:50:27.059 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:50:27.933 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:50:27.966 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:50:28.077 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:50:28.128 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -08:50:28.230 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:28.231 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:28.243 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:50:28.349 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:50:28.371 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:28.371 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:28.375 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:28.375 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:28.436 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:28.461 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:28.479 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:50:28.481 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:50:28.496 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:50:28.602 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -08:50:28.603 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:50:30.920 [info] beam_mcp: refused by host authorize/1: :nope -... -08:50:33.049 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -08:50:33.264 [info] beam_mcp: refused by host authorize/1: :nope -... -08:50:33.990 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.3 seconds (1.9s async, 5.3s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 422155, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:50:36.179 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:50:37.002 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:37.003 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:37.055 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:50:37.147 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:37.148 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:37.148 [info] beam_mcp: refused by host authorize/1: :nope -... -08:50:37.199 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:37.208 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:37.208 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:50:37.208 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -08:50:37.311 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:50:37.381 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:50:37.519 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:50:37.585 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:50:37.638 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:37.639 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:37.639 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:37.690 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:37.690 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:50:40.750 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:50:40.958 [info] beam_mcp: refused by host authorize/1: :nope -. -08:50:40.970 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:50:41.684 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 7.5 seconds (2.1s async, 5.4s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 683375, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -08:50:45.334 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................. -08:50:46.396 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:46.397 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -08:50:46.551 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:50:46.568 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:46.582 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:50:46.590 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:46.599 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:50:46.650 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:46.653 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:50:46.757 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:46.757 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:50:46.782 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:46.786 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:50:46.837 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:50:46.888 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:46.889 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:46.889 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:46.889 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:50:46.904 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:50:50.481 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:50:51.241 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:50:52.141 [info] beam_mcp: refused by host authorize/1: :nope -. -08:50:52.148 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 7.2 seconds (2.0s async, 5.2s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 739424, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -08:50:54.480 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -08:50:55.277 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:55.323 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:50:55.323 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:50:55.324 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:55.324 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:50:55.337 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:50:55.394 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:50:55.417 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:55.433 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:50:55.485 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:50:55.485 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................... -08:50:55.827 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:50:55.828 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:50:55.828 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:55.828 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:50:55.829 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:50:55.842 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:50:55.895 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:50:55.947 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:50:58.186 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:50:58.220 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:50:58.251 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:51:00.496 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 7.3 seconds (2.0s async, 5.2s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 776768, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:51:03.630 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:51:04.326 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:04.330 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:51:04.490 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:51:04.519 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:04.520 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:51:04.532 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:51:04.533 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:04.533 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:04.533 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:51:04.588 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:51:04.600 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:51:04.652 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................. -08:51:04.811 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:04.812 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:04.812 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:04.812 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:04.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:51:04.813 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:51:04.865 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:51:08.469 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:51:10.638 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:51:10.648 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:51:10.669 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.7 seconds (2.0s async, 5.6s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 139167, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -08:51:12.872 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -08:51:13.699 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:51:13.721 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:51:13.748 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:13.787 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:51:13.787 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -08:51:13.890 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:13.891 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:13.891 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:13.895 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:51:13.966 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:51:14.017 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:51:14.019 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:51:14.069 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:14.070 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -08:51:14.264 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:14.268 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:51:14.330 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:14.330 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:14.340 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:51:17.565 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:51:17.740 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:51:19.886 [info] beam_mcp: refused by host authorize/1: :nope -. -08:51:19.896 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.5 seconds (2.0s async, 5.5s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 364160, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -08:51:22.017 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -08:51:22.834 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:51:22.951 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:51:22.969 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:22.970 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:51:22.996 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:51:23.048 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:51:23.049 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - -08:51:23.049 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:23.050 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:23.050 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:51:23.067 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:51:23.135 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:51:23.340 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:23.340 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:23.341 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:23.341 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:23.341 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -08:51:23.392 [info] beam_mcp: refused by host authorize/1: :nope -. -08:51:23.443 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:51:26.587 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -08:51:27.318 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:51:27.522 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:51:27.526 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:51:27.527 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:51:28.938 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.3 seconds (1.8s async, 5.5s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 492725, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:51:31.221 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -08:51:31.981 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:31.982 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:32.002 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:32.002 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:51:32.085 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:51:32.198 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:51:32.249 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:51:32.326 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:32.396 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:51:32.407 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:32.407 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:32.409 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:32.417 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:51:32.418 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:51:32.418 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:51:32.520 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:51:32.589 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:51:32.604 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:32.605 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:51:35.403 [info] beam_mcp: refused by host authorize/1: :nope -... -08:51:36.308 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:51:38.480 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -08:51:38.486 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 7.8 seconds (1.9s async, 5.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 928147, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:51:40.730 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:51:41.502 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:51:41.604 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:51:41.605 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:51:41.726 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -08:51:41.737 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:41.744 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:41.745 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:51:41.745 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:41.745 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:41.746 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:51:41.943 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:41.944 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:51:41.959 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:51:41.970 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:41.970 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:51:42.022 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:42.023 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:51:42.074 [info] beam_mcp: refused by host authorize/1: :nope -... -08:51:42.125 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -08:51:44.347 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:51:44.456 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:51:44.466 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -........ -08:51:46.636 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.2 seconds (2.1s async, 5.1s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 832801, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:51:49.598 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:51:50.246 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:51:50.324 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:51:50.341 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:50.342 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:51:50.446 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:50.466 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:51:50.521 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -08:51:50.542 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:51:50.543 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:50.543 [info] beam_mcp: refused by host authorize/1: :nope -. -08:51:50.603 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:50.603 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:50.604 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:51:50.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:51:50.866 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:51:50.918 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -08:51:50.918 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:50.919 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:50.919 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:51:53.868 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:51:53.879 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:51:54.601 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:51:56.215 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:51:56.216 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.2 seconds (1.8s async, 5.3s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 746404, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:51:58.520 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -08:51:59.270 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:51:59.282 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:59.282 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:51:59.282 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:51:59.368 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:59.379 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -08:51:59.408 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:51:59.563 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:59.564 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:59.620 [info] beam_mcp: refused by host authorize/1: :nope -.............. -08:51:59.689 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:51:59.763 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:51:59.767 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:51:59.818 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:51:59.841 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:51:59.852 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:51:59.954 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:51:59.955 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:51:59.955 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -08:52:02.002 [info] beam_mcp: refused by host authorize/1: :nope -... -08:52:04.132 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:52:04.860 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:52:04.882 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 6.9 seconds (2.0s async, 4.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 432788, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -08:52:07.107 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -08:52:08.043 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:52:08.069 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:52:08.130 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:52:08.288 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -08:52:08.355 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:52:08.358 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:52:08.369 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:52:08.522 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:52:08.522 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:08.523 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:08.523 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:08.524 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:08.524 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:08.547 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:52:08.627 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:52:08.628 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:08.628 [info] beam_mcp: refused by host authorize/1: :nope -... -08:52:08.679 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -08:52:08.682 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -08:52:10.868 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:52:12.297 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:52:12.417 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:52:12.434 [info] beam_mcp: refused by host authorize/1: :nope -...... -Finished in 7.2 seconds (2.0s async, 5.2s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 400802, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:52:16.254 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -08:52:17.008 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:17.009 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:17.049 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:52:17.100 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:52:17.132 [info] beam_mcp: refused by host authorize/1: :nope -... -08:52:17.183 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:52:17.205 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:52:17.308 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:52:17.327 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:17.378 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:17.383 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:52:17.434 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:52:17.443 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:52:17.494 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:17.495 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:17.495 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:17.495 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:17.495 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -08:52:17.598 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -08:52:19.869 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:52:19.916 [info] beam_mcp: refused by host authorize/1: :nope -. -08:52:19.924 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:52:21.496 [info] beam_mcp: refused by host authorize/1: :nope -...... -Finished in 7.3 seconds (2.1s async, 5.2s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 430414, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -08:52:25.252 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:52:26.055 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:26.056 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -08:52:26.165 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:52:26.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:52:26.248 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:26.249 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:26.249 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:26.269 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:52:26.323 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:52:26.323 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:52:26.375 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:52:26.445 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:26.445 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:52:26.446 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:26.449 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:26.454 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:26.454 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:52:26.506 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:52:26.521 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:52:29.556 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:52:31.050 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:52:31.058 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:52:31.067 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 7.8 seconds (1.9s async, 5.9s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 911152, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -08:52:34.575 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -08:52:35.338 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:52:35.338 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:52:35.487 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:35.488 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:35.488 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:52:35.502 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:52:35.604 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -08:52:35.658 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:35.659 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:35.659 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:52:35.737 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:52:35.789 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:52:35.789 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:52:35.857 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:35.909 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:52:35.922 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:52:35.934 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:52:35.941 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:52:35.941 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -08:52:39.468 [info] beam_mcp: refused by host authorize/1: :nope -.... -08:52:41.064 [info] beam_mcp: refused by host authorize/1: :nope -... -08:52:41.783 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:52:41.800 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 7.7 seconds (1.9s async, 5.8s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 290163, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -08:52:44.009 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -08:52:44.864 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:44.926 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:52:44.946 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:52:44.948 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:44.948 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:44.949 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:52:45.000 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:52:45.050 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -08:52:45.236 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:52:45.238 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:45.241 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:45.241 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:52:45.242 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:52:45.242 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:45.242 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:52:45.294 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:45.294 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:52:45.366 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:52:45.386 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -08:52:48.763 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:52:48.781 [info] beam_mcp: refused by host authorize/1: :nope -........ -08:52:50.960 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:52:50.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.5 seconds (1.9s async, 5.5s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 541166, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:52:53.377 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:52:54.194 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -08:52:54.288 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:54.300 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:54.317 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:52:54.368 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:52:54.397 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:52:54.448 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:52:54.551 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:54.552 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:52:54.552 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:54.554 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:52:54.616 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:52:54.788 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:52:54.789 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:54.790 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:54.790 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:52:54.790 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -08:52:54.793 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -08:52:54.845 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:52:57.477 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:52:57.643 [info] beam_mcp: refused by host authorize/1: :nope -... -08:52:59.764 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:53:00.485 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.7 seconds (2.1s async, 5.6s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 908660, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -08:53:02.573 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................................. -08:53:03.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:53:03.476 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:03.497 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -08:53:03.507 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:53:03.577 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:53:03.698 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:03.699 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:03.700 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:03.700 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:03.700 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -08:53:03.710 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:03.710 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:53:03.824 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:03.828 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:03.828 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:53:03.883 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:03.957 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:03.957 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:03.957 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:53:09.213 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:53:09.250 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:53:09.261 [info] beam_mcp: refused by host authorize/1: :nope -. -08:53:09.428 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:53:09.429 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.3 seconds (1.9s async, 5.4s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 913256, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................... -08:53:11.756 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -08:53:12.534 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:12.600 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -08:53:12.651 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:53:12.725 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:53:12.745 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:12.746 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:53:12.800 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:12.801 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:12.801 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:12.802 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:12.828 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:53:12.899 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -08:53:12.914 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:12.971 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:53:12.971 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:53:12.973 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:12.973 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:53:12.984 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:12.984 [info] beam_mcp: refused by host authorize/1: :nope -................................. -08:53:17.454 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:53:17.573 [info] beam_mcp: refused by host authorize/1: :nope -... -08:53:18.985 [info] beam_mcp: refused by host authorize/1: :nope -. -08:53:18.996 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 7.9 seconds (2.1s async, 5.7s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 491267, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:53:21.337 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -08:53:22.055 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:53:22.227 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:22.227 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:53:22.227 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:53:22.231 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:22.232 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:53:22.334 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -08:53:22.347 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:22.347 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:22.347 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:53:22.348 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:22.462 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:53:22.463 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:22.463 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:22.464 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:22.464 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:22.464 [info] beam_mcp: refused by host authorize/1: :nope -.......... -08:53:22.591 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:22.605 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............................. -08:53:25.322 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -08:53:25.328 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -08:53:26.748 [info] beam_mcp: refused by host authorize/1: :nope -...... -08:53:28.382 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:53:28.383 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.6 seconds (1.9s async, 5.6s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 868470, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -08:53:30.671 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -08:53:31.259 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:31.259 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:31.260 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:31.362 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:31.418 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -08:53:31.419 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:31.437 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:31.438 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:53:31.455 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:53:31.464 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:31.468 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:31.469 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:53:31.519 [info] beam_mcp: refused by host authorize/1: :nope -... -08:53:31.570 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................................... -08:53:31.753 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:31.753 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:31.760 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:53:31.760 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -08:53:31.976 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:53:35.762 [info] beam_mcp: refused by host authorize/1: :nope -. -08:53:35.777 [info] beam_mcp: refused by host authorize/1: :nope -. -08:53:35.786 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -....... -08:53:36.549 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 7.2 seconds (1.9s async, 5.2s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 762313, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -08:53:39.691 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -08:53:40.415 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:53:40.500 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:40.501 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:53:40.555 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:40.607 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:40.607 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:40.608 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:40.608 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:53:40.622 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:53:40.673 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:40.673 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:53:40.747 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:40.757 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -08:53:40.814 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:53:40.931 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -08:53:40.998 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:41.000 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:53:41.000 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:53:41.052 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -08:53:44.473 [info] beam_mcp: refused by host authorize/1: :nope -. -08:53:44.620 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:53:44.623 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:53:44.632 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:53:45.359 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -Finished in 7.8 seconds (2.0s async, 5.7s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 351149, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -08:53:48.983 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -08:53:49.980 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:49.997 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:53:50.031 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:53:50.065 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:53:50.065 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:50.082 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:50.083 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -08:53:50.111 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:53:50.112 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:53:50.278 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:50.279 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:50.279 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:50.297 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:53:50.351 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:53:50.351 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -08:53:50.453 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:53:50.457 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:53:50.531 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -08:53:50.634 [info] beam_mcp: refused by host authorize/1: :nope -................. -08:53:53.696 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:53:53.700 [info] beam_mcp: refused by host authorize/1: :nope -. -08:53:53.711 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -08:53:54.439 [info] beam_mcp: refused by host authorize/1: :nope -. -08:53:54.446 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 7.3 seconds (2.1s async, 5.1s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 337848, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -08:53:58.105 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -08:53:58.831 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -08:53:58.955 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:58.975 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:53:58.976 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -08:53:58.984 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -08:53:59.011 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -08:53:59.076 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:53:59.139 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:53:59.245 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:53:59.245 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -08:53:59.308 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:53:59.361 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:59.361 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:59.362 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:59.362 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:53:59.413 [info] beam_mcp: refused by host authorize/1: :nope -....... -08:53:59.465 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:53:59.465 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:53:59.465 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -08:54:02.583 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -08:54:03.497 [info] beam_mcp: refused by host authorize/1: :nope -.. -08:54:03.513 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -08:54:04.952 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.4 seconds (1.9s async, 5.4s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 438643, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -08:54:07.140 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -08:54:07.975 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:54:07.976 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:54:07.976 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:54:07.996 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:54:08.006 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:54:08.011 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:54:08.065 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -08:54:08.184 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:54:08.186 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -08:54:08.205 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:54:08.209 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:54:08.260 [info] beam_mcp: refused by host authorize/1: :nope -............. -08:54:08.397 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:54:08.409 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -08:54:08.460 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:54:08.464 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:54:08.464 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:54:08.464 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:54:08.465 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -08:54:10.942 [info] beam_mcp: refused by host authorize/1: :nope -..... -08:54:10.996 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:54:11.012 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -08:54:12.420 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 7.2 seconds (1.8s async, 5.3s sync) -164 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 302362, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -08:54:16.037 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -08:54:16.893 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -08:54:16.973 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -08:54:17.073 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -08:54:17.134 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:54:17.134 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:54:17.207 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -08:54:17.208 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -08:54:17.273 [info] beam_mcp: refused by host authorize/1: :nope -. -08:54:17.329 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -08:54:17.337 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:54:17.339 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:54:17.339 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -08:54:17.344 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -08:54:17.344 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -08:54:17.344 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -08:54:17.395 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -08:54:17.395 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -08:54:17.446 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -08:54:17.549 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -08:54:21.341 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:514: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -08:54:21.407 [info] beam_mcp: refused by host authorize/1: :nope -... -08:54:22.128 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -08:54:22.931 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -08:54:22.933 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.4 seconds (2.1s async, 5.3s sync) -164 tests, 0 failures -RUN_EXIT=0 - -== green-rate-mc8-load32-round2: 1 run(s) of 40 exited non-zero == diff --git a/slices/006-harness-honesty/logs/green-rate-mc8-load32.txt b/slices/006-harness-honesty/logs/green-rate-mc8-load32.txt deleted file mode 100644 index 8b961491..00000000 --- a/slices/006-harness-honesty/logs/green-rate-mc8-load32.txt +++ /dev/null @@ -1,10227 +0,0 @@ -== green-rate-mc8-load32 == -command: mix test --max-cases 8 (x40 consecutive runs) -background load: 32 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=5 -date: 2026-09-08T02:28:29Z - ----- run 1 ---- -Running ExUnit with seed: 265158, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:28:32.020 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:28:32.839 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:28:32.884 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:32.913 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:28:32.913 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:28:32.973 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:28:32.990 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:32.990 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:33.010 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:33.013 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............................. -22:28:33.169 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:28:33.169 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:28:33.272 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:33.273 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:33.273 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:33.324 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:33.324 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:28:33.353 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:28:33.507 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:33.507 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:28:37.281 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:28:38.718 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:28:38.869 [info] beam_mcp: refused by host authorize/1: :nope -. -22:28:38.881 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 7.4 seconds (2.0s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 329157, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:28:41.098 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:28:41.921 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:28:41.922 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:28:42.024 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:28:42.034 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:28:42.035 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:42.036 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:42.036 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:28:42.087 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:28:42.154 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:28:42.180 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:28:42.249 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:42.249 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:42.250 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:42.250 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:28:42.307 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:28:42.374 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:42.374 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:28:42.375 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:28:42.375 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:28:45.621 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:28:45.673 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:28:45.681 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:28:47.811 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 7.3 seconds (1.9s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 242318, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:28:50.001 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:28:50.914 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -22:28:51.034 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:28:51.060 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:28:51.132 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:28:51.147 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:51.147 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:51.199 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:28:51.300 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:51.302 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:51.353 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:28:51.358 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:28:51.388 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:28:51.388 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:28:51.389 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:51.389 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:28:51.392 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:28:51.455 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:28:51.455 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:28:51.507 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:28:55.260 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:28:57.606 [info] beam_mcp: refused by host authorize/1: :nope -. -22:28:57.618 [info] beam_mcp: refused by host authorize/1: :nope -. -22:28:57.623 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 8.1 seconds (2.0s async, 6.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 128163, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:28:59.881 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:29:00.738 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:00.765 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:00.766 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:29:00.831 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:29:00.911 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:00.925 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:00.931 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:29:00.936 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:29:00.994 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..................... -22:29:01.058 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:01.058 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:01.058 [info] beam_mcp: refused by host authorize/1: :nope -. -22:29:01.127 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:29:01.233 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:29:01.234 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:29:01.289 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:01.290 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:01.290 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:01.290 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:29:05.168 [info] beam_mcp: refused by host authorize/1: :nope -....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:29:05.950 [info] beam_mcp: refused by host authorize/1: :nope -. -22:29:05.957 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:29:05.969 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 7.3 seconds (2.0s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 205181, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:29:08.987 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:29:09.893 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:09.894 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:09.906 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:29:09.913 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:09.913 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:09.913 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:09.914 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:29:09.916 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:09.916 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:29:09.916 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:09.918 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:29:10.088 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:10.089 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:29:10.157 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:29:10.178 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:10.229 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:29:10.280 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:29:10.281 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:10.285 [info] beam_mcp: refused by host authorize/1: :nope -...........http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:29:12.689 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:29:13.425 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:29:13.559 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:29:15.679 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.2 seconds (1.9s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 198499, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:29:18.014 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:29:18.765 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:18.765 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:29:18.861 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:18.910 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:29:18.917 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:29:18.931 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:29:18.956 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:18.957 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:29:19.009 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:29:19.035 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:29:19.086 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:29:19.139 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:29:19.190 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:29:19.296 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:19.297 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:19.297 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:19.297 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:19.298 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:19.298 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........................ -22:29:22.384 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:29:22.407 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:29:24.565 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:29:24.716 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.3 seconds (2.0s async, 5.2s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 199152, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:29:27.069 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:29:27.858 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:29:27.901 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:27.901 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:29:28.031 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:28.031 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:29:28.084 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:28.084 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:28.084 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:29:28.198 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:29:28.216 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:29:28.239 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:29:28.313 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:28.326 [info] beam_mcp: refused by host authorize/1: :nope -. -22:29:28.377 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:29:28.481 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:28.482 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:29:28.492 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:28.493 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:29:28.547 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:29:31.055 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:29:31.083 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:29:31.091 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:29:33.922 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 7.5 seconds (2.1s async, 5.4s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 442780, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:29:36.169 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:29:37.027 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:29:37.028 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:37.028 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:37.028 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:37.029 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:29:37.082 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:29:37.185 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:29:37.398 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:29:37.449 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:37.454 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:37.455 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:29:37.473 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:29:37.487 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:37.488 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:37.488 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:37.488 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:37.488 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:29:37.633 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:37.641 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:29:39.843 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:29:40.574 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:29:40.771 [info] beam_mcp: refused by host authorize/1: :nope -. -22:29:40.783 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -Finished in 7.2 seconds (1.9s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 495166, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:29:45.257 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:29:45.800 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:45.801 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:29:45.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:29:45.867 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -22:29:45.965 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:45.976 [info] beam_mcp: refused by host authorize/1: :nope -... -22:29:46.027 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:29:46.131 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:46.131 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:29:46.156 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:46.157 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:46.280 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:46.298 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:46.299 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:29:46.299 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:29:46.350 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:46.351 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:46.351 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:29:46.412 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:29:49.459 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:29:50.279 [info] beam_mcp: refused by host authorize/1: :nope -... -22:29:51.702 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:29:51.716 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 7.8 seconds (1.9s async, 5.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 940158, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:29:54.534 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:29:55.398 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:29:55.528 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:29:55.544 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:55.547 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:29:55.602 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:55.615 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:29:55.667 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:29:55.672 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:55.672 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:29:55.736 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:29:55.738 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:55.739 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:29:55.763 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:29:55.764 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:29:55.764 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -22:29:55.874 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:29:55.925 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:55.927 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:29:55.927 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:29:58.774 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:29:58.838 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:29:59.569 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:30:00.985 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 7.5 seconds (1.9s async, 5.6s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 194151, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:30:04.124 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:30:04.890 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:30:04.905 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:04.905 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -22:30:05.059 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:05.060 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:05.060 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:30:05.162 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:05.163 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:30:05.178 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:05.182 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:05.183 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:05.183 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:05.183 [info] beam_mcp: refused by host authorize/1: :nope -... -22:30:05.285 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:05.295 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:30:05.295 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:30:05.346 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:30:05.359 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:30:05.464 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:30:07.946 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -22:30:10.094 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:30:10.261 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:30:10.983 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 7.5 seconds (2.1s async, 5.4s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 469220, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:30:13.194 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:30:14.184 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:30:14.235 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:30:14.286 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:30:14.286 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:14.299 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:14.366 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:30:14.468 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:14.539 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:14.540 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:14.540 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:30:14.613 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:30:14.664 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:14.665 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:14.665 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:14.717 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:30:14.719 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:30:14.744 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:14.745 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:30:14.796 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -22:30:18.840 [info] beam_mcp: refused by host authorize/1: :nope -... -22:30:18.966 [info] beam_mcp: refused by host authorize/1: :nope -. -22:30:18.978 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:30:20.409 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.7 seconds (2.1s async, 5.6s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 902303, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:30:22.735 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:30:23.260 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:30:23.369 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:23.370 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:23.395 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:30:23.448 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:23.526 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:30:23.593 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:30:23.598 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:30:23.726 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:23.727 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:23.727 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:30:23.727 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:23.779 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:30:23.830 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:23.831 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:23.831 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:30:23.841 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:23.841 [info] beam_mcp: refused by host authorize/1: :nope -.................. -22:30:23.960 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:30:27.580 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:30:27.640 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:30:29.071 [info] beam_mcp: refused by host authorize/1: :nope -. -22:30:29.078 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 7.0 seconds (1.8s async, 5.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 571590, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:30:31.190 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................................. -22:30:32.158 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:32.159 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:32.159 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:32.159 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:30:32.236 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:32.236 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:32.237 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:30:32.303 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:32.303 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:30:32.308 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:30:32.360 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:32.360 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:30:32.363 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:30:32.363 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:30:32.434 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:30:32.457 [info] beam_mcp: refused by host authorize/1: :nope -............... -22:30:32.611 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:32.611 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:32.681 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:30:35.036 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -22:30:37.219 [info] beam_mcp: refused by host authorize/1: :nope -. -22:30:37.407 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:30:38.124 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.3 seconds (1.9s async, 5.4s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 610146, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:30:40.395 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:30:41.234 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:41.235 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:41.236 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:30:41.296 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:30:41.337 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:30:41.473 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:30:41.576 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:41.577 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:41.577 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:41.581 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:41.632 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:30:41.683 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:30:41.700 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:41.700 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:41.704 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:41.704 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:30:41.755 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:30:41.756 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:30:41.818 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:30:44.777 [info] beam_mcp: refused by host authorize/1: :nope -... -22:30:45.667 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:30:47.086 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:30:47.095 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.2 seconds (2.0s async, 5.2s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 673782, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:30:49.443 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:30:50.140 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:50.140 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:30:50.141 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:50.239 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:50.295 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......................... -22:30:50.434 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:30:50.487 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:30:50.540 [info] beam_mcp: refused by host authorize/1: :nope -... -22:30:50.591 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:30:50.643 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:30:50.658 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:50.658 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:30:50.709 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:50.710 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:50.710 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:30:50.812 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:30:50.816 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:50.843 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:30:50.863 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:30:53.795 [info] beam_mcp: refused by host authorize/1: :nope -. -22:30:53.804 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:30:53.841 [info] beam_mcp: refused by host authorize/1: :nope -....http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:30:56.682 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 7.7 seconds (1.9s async, 5.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 180639, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:30:58.896 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:30:59.735 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:30:59.779 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:59.779 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:30:59.808 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:30:59.859 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:30:59.860 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:30:59.918 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:30:59.918 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:30:59.995 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:30:59.998 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:31:00.149 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:31:00.258 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:00.259 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:00.259 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:00.259 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:00.260 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:00.334 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:00.334 [info] beam_mcp: refused by host authorize/1: :nope -. -22:31:00.385 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:31:05.320 [info] beam_mcp: refused by host authorize/1: :nope -. -22:31:05.337 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:31:05.392 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:31:06.111 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.7 seconds (2.0s async, 5.6s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 644158, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:31:08.483 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:31:09.231 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:09.232 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:09.244 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -22:31:09.328 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.328 [info] beam_mcp: refused by host authorize/1: :nope -. -22:31:09.382 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:31:09.500 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:31:09.567 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:31:09.570 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:31:09.639 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.656 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.657 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.657 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.660 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.660 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:31:09.881 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:31:09.882 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.883 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:09.883 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:31:12.597 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:31:12.623 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:31:13.525 [info] beam_mcp: refused by host authorize/1: :nope -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:31:14.259 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 7.8 seconds (2.0s async, 5.8s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 196149, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:31:17.854 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:31:18.749 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:31:18.869 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:18.876 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:31:18.903 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:31:18.903 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:31:18.981 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:31:19.034 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................. -22:31:19.177 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:19.178 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:19.230 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:31:19.231 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:31:19.238 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:31:19.395 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:19.396 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:19.396 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:19.397 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:19.397 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:19.430 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:31:19.431 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..........http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:31:21.764 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:31:22.516 [info] beam_mcp: refused by host authorize/1: :nope -. -22:31:22.522 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:31:22.689 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 7.4 seconds (2.0s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 340888, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:31:27.024 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:31:27.978 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................... -22:31:28.053 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:28.067 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:31:28.089 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:31:28.192 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:28.193 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:28.245 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:28.270 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:31:28.291 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:28.292 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:28.292 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:31:28.298 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:31:28.401 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:31:28.414 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:28.414 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:31:28.465 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:28.466 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:28.466 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:28.517 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:31:30.707 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:31:32.833 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -...http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:31:33.721 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:31:33.744 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.1 seconds (2.0s async, 5.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 238148, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:31:35.931 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:31:36.630 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:31:36.727 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:36.728 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:31:36.831 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:36.831 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:36.831 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:36.842 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................. -22:31:37.039 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:37.053 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:31:37.065 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:31:37.065 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:37.069 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:31:37.171 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:31:37.222 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:31:37.225 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:37.225 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:37.225 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:31:37.250 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:37.250 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -22:31:39.497 [info] beam_mcp: refused by host authorize/1: :nope -. -22:31:39.692 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:31:41.850 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:31:42.572 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 7.1 seconds (1.9s async, 5.2s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 44171, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:31:44.712 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:31:45.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:31:45.583 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:31:45.584 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:31:45.653 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:31:45.653 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:31:45.769 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:45.799 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:31:45.851 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:45.852 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:45.852 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:31:45.889 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:31:45.940 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:31:45.941 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:45.941 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:31:45.967 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:31:46.070 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:46.070 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:31:46.126 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:46.126 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:31:49.254 [info] beam_mcp: refused by host authorize/1: :nope -. -22:31:49.267 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:31:49.277 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -..... -22:31:51.528 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -22:31:51.534 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.3 seconds (1.9s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 996432, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:31:53.794 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:31:54.641 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:31:54.692 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:31:54.698 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:31:54.806 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:54.807 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:54.807 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:31:54.863 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:54.876 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:31:54.931 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:31:54.931 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:54.947 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:31:54.958 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:31:54.958 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:31:55.009 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:31:55.076 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:31:55.077 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:55.100 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...................... -22:31:55.215 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:31:55.216 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:31:58.079 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:32:00.213 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:32:00.221 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:32:00.434 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.1 seconds (1.9s async, 5.2s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 887166, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:32:02.531 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:32:03.452 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:32:03.654 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:32:03.654 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:32:03.774 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:03.775 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:32:03.790 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:03.790 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:32:03.865 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:03.867 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:32:03.919 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:03.919 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:03.919 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:32:03.985 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:32:04.038 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:04.038 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:32:04.090 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:04.090 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:32:04.106 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:04.106 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:32:06.172 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:32:06.936 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:32:07.113 [info] beam_mcp: refused by host authorize/1: :nope -. -22:32:07.128 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -....http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 7.2 seconds (2.0s async, 5.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 733624, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:32:11.466 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:32:12.324 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:12.325 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:32:12.472 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:12.487 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:12.488 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:32:12.488 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:12.490 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:32:12.557 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:12.558 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:12.560 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:32:12.611 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:32:12.665 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:32:12.671 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:32:12.723 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:32:12.781 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:32:12.781 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:32:12.851 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:12.851 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:32:12.994 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:32:16.863 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:32:16.869 [info] beam_mcp: refused by host authorize/1: :nope -... -22:32:17.006 [info] beam_mcp: refused by host authorize/1: :nope -. -22:32:17.017 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 8.2 seconds (2.0s async, 6.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 615447, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:32:21.411 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:32:22.169 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:32:22.249 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:32:22.300 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:22.303 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:22.303 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:22.406 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:32:22.434 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:22.440 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:22.441 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:32:22.504 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:32:22.657 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:22.658 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:32:22.728 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:22.745 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:22.745 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:32:22.747 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:32:22.798 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:32:22.815 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:22.815 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:32:26.110 [info] beam_mcp: refused by host authorize/1: :nope -. -22:32:26.120 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:32:26.307 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:32:28.439 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 7.6 seconds (2.0s async, 5.6s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 998586, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:32:30.789 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:32:31.608 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:31.609 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:32:31.641 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:32:31.643 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:32:31.667 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:31.674 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:31.709 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:32:31.811 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:32:31.866 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:31.867 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:32:31.922 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:32:31.939 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:32:32.006 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:32:32.006 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:32.007 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:32.007 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:32:32.058 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:32:32.109 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:32.110 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:32:37.321 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:32:37.331 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:32:37.351 [info] beam_mcp: refused by host authorize/1: :nope -. -22:32:37.540 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 7.3 seconds (2.0s async, 5.2s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 19341, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:32:39.733 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:32:40.653 [info] beam_mcp: refused by host authorize/1: :nope -... -22:32:40.714 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:32:40.715 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:32:40.787 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:32:40.787 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:40.788 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:40.800 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:40.801 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:40.801 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:40.903 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:32:40.976 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:32:40.977 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:32:41.083 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:32:41.084 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:32:41.136 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:32:41.143 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:32:41.150 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:41.169 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:32:41.184 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:32:43.578 [info] beam_mcp: refused by host authorize/1: :nope -. -22:32:43.598 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:32:43.606 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:32:43.744 [info] beam_mcp: refused by host authorize/1: :nope -.....http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -Finished in 7.4 seconds (1.9s async, 5.4s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 121155, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:32:48.908 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:32:49.702 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - -22:32:49.703 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:32:49.705 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:32:49.811 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:32:49.813 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:32:49.813 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:49.813 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:49.813 [info] beam_mcp: refused by host authorize/1: :nope -. -22:32:49.864 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:32:49.884 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:32:49.941 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:49.941 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:49.958 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:49.958 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:32:49.985 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:32:50.088 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:32:50.191 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:32:50.242 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:32:50.331 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:32:52.641 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:32:53.529 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -22:32:53.537 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -22:32:53.537 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 3/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -22:32:53.538 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:32:53.554 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:32:53.562 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.... -Finished in 7.4 seconds (2.0s async, 5.3s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 247636, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:32:58.042 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:32:58.577 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:58.633 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -22:32:58.634 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:32:58.635 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:32:58.678 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:58.700 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:32:58.769 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:32:58.820 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:32:58.945 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:32:59.057 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:32:59.057 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:59.058 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:32:59.113 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:32:59.113 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:59.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:32:59.169 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:32:59.221 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:59.222 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:32:59.222 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:33:03.673 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:33:03.807 [info] beam_mcp: refused by host authorize/1: :nope -. -22:33:03.818 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:33:04.538 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 7.0 seconds (1.8s async, 5.2s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 41151, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:33:06.818 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:33:07.341 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:07.444 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:07.457 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:07.457 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:33:07.477 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:33:07.477 [info] beam_mcp: refused by host authorize/1: :nope -. -22:33:07.529 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -22:33:07.638 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:33:07.758 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:33:07.759 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:33:07.782 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:33:07.833 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:33:07.884 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:07.885 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:07.885 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:07.885 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:07.937 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:07.937 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:33:07.938 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:33:11.555 [info] beam_mcp: refused by host authorize/1: :nope -. -22:33:11.569 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:33:11.579 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:33:12.292 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 7.5 seconds (1.8s async, 5.7s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 260410, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:33:16.042 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:33:16.768 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:16.769 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:16.769 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:16.770 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:16.770 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:33:16.823 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:16.900 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:16.959 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:33:17.052 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:33:17.158 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:33:17.235 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:33:17.235 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:33:17.286 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:17.287 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:33:17.294 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:33:17.400 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:33:17.401 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:17.447 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:33:17.447 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:33:20.071 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:33:20.092 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:33:22.398 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -22:33:22.399 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:33:22.415 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 7.7 seconds (2.1s async, 5.6s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 712168, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:33:25.562 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:33:26.348 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:26.348 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:33:26.398 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:26.398 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:26.399 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:33:26.450 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:33:26.483 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:33:26.494 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:33:26.494 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:26.495 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:26.495 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........................ -22:33:26.654 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:26.719 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:33:26.772 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:33:26.772 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:33:26.893 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:33:26.919 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:26.928 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:26.928 [info] beam_mcp: refused by host authorize/1: :nope -...........http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:33:31.237 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:33:31.435 [info] beam_mcp: refused by host authorize/1: :nope -... -22:33:32.184 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:33:32.916 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.9 seconds (2.0s async, 5.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 392450, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:33:35.189 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:33:36.017 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:33:36.179 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:33:36.256 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:33:36.257 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:33:36.257 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:36.258 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................. -22:33:36.321 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:36.321 [info] beam_mcp: refused by host authorize/1: :nope -... -22:33:36.372 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:36.372 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:36.393 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:33:36.394 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:33:36.511 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:33:36.544 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:36.544 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:36.545 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:36.545 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:36.607 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:36.607 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:33:38.875 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:33:38.928 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:33:40.344 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:33:40.357 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 7.1 seconds (2.0s async, 5.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 347372, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:33:44.161 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:33:44.994 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:33:45.072 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:33:45.140 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:33:45.222 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:33:45.226 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:33:45.308 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:33:45.309 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:45.309 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:33:45.320 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:45.320 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:45.321 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:33:45.427 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:45.428 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:45.429 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............................. -22:33:45.634 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:33:45.644 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:33:45.644 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:33:45.645 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:45.646 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:33:47.799 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:33:47.820 [info] beam_mcp: refused by host authorize/1: :nope -......http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:33:50.687 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:33:50.830 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 7.3 seconds (2.1s async, 5.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 351349, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:33:53.156 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:33:53.907 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:53.908 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:53.910 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:33:53.960 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:33:54.023 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:33:54.078 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:33:54.096 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:33:54.148 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:33:54.148 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:33:54.199 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:33:54.200 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:33:54.200 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:33:54.220 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:33:54.325 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:33:54.427 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:33:54.543 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:33:54.543 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:33:54.555 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:33:54.555 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:33:58.804 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:33:58.942 [info] beam_mcp: refused by host authorize/1: :nope -. -22:33:58.951 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:33:59.714 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -Finished in 7.1 seconds (2.0s async, 5.1s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 328289, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:34:02.119 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:34:02.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:34:03.024 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:34:03.090 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:03.104 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:34:03.110 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:34:03.111 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:34:03.122 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:34:03.181 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:34:03.181 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:03.182 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:03.182 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:34:03.204 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:34:03.256 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -22:34:03.278 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:34:03.380 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:34:03.504 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:03.504 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:03.505 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:03.505 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -22:34:06.140 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:34:08.281 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:34:08.996 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:34:09.019 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 7.4 seconds (2.0s async, 5.4s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 498558, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:34:11.213 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -22:34:12.023 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:12.023 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:34:12.168 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:34:12.231 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:34:12.231 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:34:12.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:34:12.316 [info] beam_mcp: refused by host authorize/1: :nope -... -22:34:12.367 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:34:12.425 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:34:12.477 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:34:12.634 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:12.656 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:34:12.690 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:34:12.743 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:34:12.758 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:12.759 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:12.759 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:12.759 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -22:34:12.762 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:34:15.230 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:34:15.984 [info] beam_mcp: refused by host authorize/1: :nope -. -22:34:16.091 [info] beam_mcp: refused by host authorize/1: :nope -http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - -22:34:16.092 [info] beam_mcp: refused by host authorize/1: :nope -..http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -. -22:34:16.817 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 7.5 seconds (2.0s async, 5.4s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 748369, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:34:20.607 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -22:34:21.287 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:34:21.288 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:34:21.290 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:21.290 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:21.290 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:34:21.414 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:34:21.418 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:34:21.480 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:21.480 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:21.481 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:21.481 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:34:21.532 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:34:21.586 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:34:21.602 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:21.605 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:21.605 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:34:21.767 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:34:21.859 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:34:21.910 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:34:25.509 [info] beam_mcp: refused by host authorize/1: :nope -. -22:34:25.525 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:34:26.415 [info] beam_mcp: refused by host authorize/1: :nope -.http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -... -22:34:27.840 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 7.9 seconds (1.9s async, 5.9s sync) -162 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 397528, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:34:30.213 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:34:31.187 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:34:31.263 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:34:31.272 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:34:31.325 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:34:31.386 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:31.402 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:34:31.429 [info] beam_mcp: refused by host authorize/1: :nope -. -22:34:31.479 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:34:31.479 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:34:31.480 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:34:31.480 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:34:31.550 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:34:31.551 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:31.551 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:31.552 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:34:31.552 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:34:31.553 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:34:31.553 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:34:31.554 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:34:33.847 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:34:34.570 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.http_bandit_test: exchange 1/5 produced no measurement (:econnreset after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 2/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 3/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -http_bandit_test: exchange 4/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. -.. -22:34:35.292 [info] beam_mcp: refused by host authorize/1: :nope -... -22:34:35.343 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 7.1 seconds (2.0s async, 5.1s sync) -162 tests, 0 failures -RUN_EXIT=0 - -== green-rate-mc8-load32: 0 run(s) of 40 exited non-zero == diff --git a/slices/006-harness-honesty/logs/mutation-harness-anchors-round2.txt b/slices/006-harness-honesty/logs/mutation-harness-anchors-round2.txt deleted file mode 100644 index 1af06f6b..00000000 --- a/slices/006-harness-honesty/logs/mutation-harness-anchors-round2.txt +++ /dev/null @@ -1,82 +0,0 @@ -== the harness anchors, mutated -- ROUND 2, at full suite scale == -date: 2026-09-08T12:06:42Z -command per mutant: mix test (the WHOLE suite, not one file -- round 1 finding B1) - -H1 applied ---- H1: diff against the file that ships --- ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/r2_bandit_test.exs 2026-09-08 08:06:42.375878850 -0400 -+++ test/beam_mcp/transport/http_bandit_test.exs 2026-09-08 08:06:42.392046822 -0400 -@@ -252,7 +252,7 @@ - @read_ms 10_000 - - defp collect(sock, acc, expect) do -- if complete_responses(acc) >= expect do -+ if true do - settle(sock, acc) - else - receive do ---- H1: mix test --- - 1) test the harness itself: what it will and will not report as a measurement a server that closes without answering is reported at once, and is NOT repeated (BeamMCP.Transport.HTTPBanditTest) - 2) test the harness itself: what it will and will not report as a measurement a response split across the hold window is read whole, not cut at it (BeamMCP.Transport.HTTPBanditTest) - 3) test the harness itself: what it will and will not report as a measurement a connection aborted every time raises after the bound instead of looping (BeamMCP.Transport.HTTPBanditTest) - 4) test the harness itself: what it will and will not report as a measurement an aborted connection is repeated, and the repeat is announced (BeamMCP.Transport.HTTPBanditTest) -164 tests, 4 failures -TEST_EXIT=2 - -H2 applied ---- H2: diff against the file that ships --- ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/r2_bandit_test.exs 2026-09-08 08:06:42.375878850 -0400 -+++ test/beam_mcp/transport/http_bandit_test.exs 2026-09-08 08:06:47.136454482 -0400 -@@ -263,7 +263,7 @@ - {:aborted, reason, acc} - - {:tcp_closed, ^sock} -> -- {:unanswered, acc} -+ {acc, :closed} - after - @read_ms -> - raise """ ---- H2: mix test --- - 1) test the harness itself: what it will and will not report as a measurement a server that closes without answering is reported at once, and is NOT repeated (BeamMCP.Transport.HTTPBanditTest) -164 tests, 1 failure -TEST_EXIT=2 - -H4 applied ---- H4: diff against the file that ships --- ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/r2_bandit_test.exs 2026-09-08 08:06:42.375878850 -0400 -+++ test/beam_mcp/transport/http_bandit_test.exs 2026-09-08 08:06:52.538598333 -0400 -@@ -182,7 +182,7 @@ - # is the check that says so, with every killed mutant still scoring what the record scores. - # - # @attempts is derived from the measured loss: 5% at its worst leaves 5 attempts at 3e-7. -- @attempts 5 -+ @attempts 1 - @connect_ms 5_000 - @write_ms 15_000 - ---- H4: mix test --- - 1) test the harness itself: what it will and will not report as a measurement a connection aborted every time raises after the bound instead of looping (BeamMCP.Transport.HTTPBanditTest) - 2) test the harness itself: what it will and will not report as a measurement an aborted connection is repeated, and the repeat is announced (BeamMCP.Transport.HTTPBanditTest) -164 tests, 2 failures -TEST_EXIT=2 - -H5 applied ---- H5: diff against the file that ships --- ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/r2_bandit_test.exs 2026-09-08 08:06:42.375878850 -0400 -+++ test/beam_mcp/transport/http_bandit_test.exs 2026-09-08 08:06:57.790999583 -0400 -@@ -263,7 +263,7 @@ - {:aborted, reason, acc} - - {:tcp_closed, ^sock} -> -- {:unanswered, acc} -+ {:aborted, :closed, acc} - after - @read_ms -> - raise """ ---- H5: mix test --- - 1) test the harness itself: what it will and will not report as a measurement a server that closes without answering is reported at once, and is NOT repeated (BeamMCP.Transport.HTTPBanditTest) -164 tests, 1 failure -TEST_EXIT=2 - -restored; unmutated: -164 tests, 0 failures diff --git a/slices/006-harness-honesty/logs/mutation-harness-anchors.txt b/slices/006-harness-honesty/logs/mutation-harness-anchors.txt deleted file mode 100644 index 0e726542..00000000 --- a/slices/006-harness-honesty/logs/mutation-harness-anchors.txt +++ /dev/null @@ -1,110 +0,0 @@ -== the two harness anchors, mutated == -date: 2026-09-08T01:55:23Z - -H1 applied ---- H1: diff against the file that ships --- ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/fixed_bandit_test.exs 2026-09-07 21:55:23.636718808 -0400 -+++ test/beam_mcp/transport/http_bandit_test.exs 2026-09-07 21:55:23.650849240 -0400 -@@ -246,7 +246,7 @@ - @read_ms 10_000 - - defp collect(sock, acc, expect) do -- if complete_responses(acc) >= expect do -+ if true do - settle(sock, acc) - else - receive do ---- H1: mix test test/beam_mcp/transport/http_bandit_test.exs --- -Running ExUnit with seed: 38657, max_cases: 64 -21:55:24.162 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 -.. -21:55:24.187 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:55:24.249 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:55:25.674 [info] beam_mcp: refused by host authorize/1: :nope -. - 1) test the harness itself: what it will and will not report as a measurement a server that never answers is reported as one, not repeated into a pass (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:582 - Expected exception RuntimeError but nothing was raised - code: assert_raise RuntimeError, - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:589: (test) - 2) test the harness itself: what it will and will not report as a measurement a response split across the hold window is read whole, not cut at it (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:560 - Assertion with == failed - code: assert byte_size(bytes) == byte_size(head) + byte_size(body) - left: 41 - right: 4041 - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:578: (test) -. -Finished in 2.3 seconds (0.00s async, 2.3s sync) -11 tests, 2 failures -TEST_EXIT=2 - -H2 applied ---- H2: diff against the file that ships --- ---- /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/fixed_bandit_test.exs 2026-09-07 21:55:23.636718808 -0400 -+++ test/beam_mcp/transport/http_bandit_test.exs 2026-09-07 21:55:26.409602092 -0400 -@@ -257,7 +257,7 @@ - {:destroyed, reason, acc} - - {:tcp_closed, ^sock} -> -- {:destroyed, :closed, acc} -+ {acc, :closed} - after - @read_ms -> - raise """ ---- H2: mix test test/beam_mcp/transport/http_bandit_test.exs --- -Running ExUnit with seed: 792786, max_cases: 64 -.... - 1) test the harness itself: what it will and will not report as a measurement a server that never answers is reported as one, not repeated into a pass (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:582 - Expected exception RuntimeError but nothing was raised - code: assert_raise RuntimeError, - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:589: (test) -21:55:29.750 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:481: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 -... -21:55:29.768 [info] beam_mcp: refused by host authorize/1: :nope -. -21:55:29.825 [info] beam_mcp: refused by host authorize/1: :nope -. -21:55:29.829 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.0 seconds (0.00s async, 3.0s sync) -11 tests, 1 failure -TEST_EXIT=2 - -restored; unmutated: -Finished in 3.0 seconds (0.00s async, 3.0s sync) -11 tests, 0 failures diff --git a/slices/006-harness-honesty/logs/probe-drain-mechanism.txt b/slices/006-harness-honesty/logs/probe-drain-mechanism.txt deleted file mode 100644 index 039e49de..00000000 --- a/slices/006-harness-honesty/logs/probe-drain-mechanism.txt +++ /dev/null @@ -1,487 +0,0 @@ -== probe: what drain/2 actually sees on the 9 MB refusal == -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b -date: 2026-09-08T01:21:04Z - ----- the probe script, verbatim ---- -# Why does `bytes` come back EMPTY from the 9 MB refusal case? -# -# The PLAN's hypothesis is the 700 ms quiet window returning a PARTIAL buffer. The measured -# failure argument is "" -- an EMPTY buffer -- and the whole suite finished in 3.5 s, so the -# 10_000 ms first-byte window was never reached either. This probe asks which socket result -# `drain/2` actually saw, and whether the bytes were LOST rather than late. -# -# Four variants of the same exchange, each run N times: -# A send-everything-then-read, show_econnreset default(false) <- what the test does today -# B send-everything-then-read, show_econnreset: true -# C read concurrently with the write, show_econnreset default -# D read concurrently with the write, show_econnreset: true -alias BeamMCP.Transport.HTTP - -defmodule Cat do - @behaviour BeamMCP.ToolCatalog - @impl true - def all do - [ - %BeamMCP.ToolSpec{ - name: :echo, - command_class: :observe, - mode: :read_only, - description: "Echo.", - input_schema: %{"type" => "object", "properties" => %{}, "additionalProperties" => true} - } - ] - end -end - -n = String.to_integer(System.get_env("N", "20")) -over = 9_000_000 -modern = "2026-07-28" -vkey = "io.modelcontextprotocol/protocolVersion" - -opts = [ - tool_catalog: Cat, - dispatch: fn _n, a, _o -> {:ok, a} end, - authorize: fn _conn -> {:error, :nope} end, - allowed_origins: :any -] - -{:ok, pid} = - Bandit.start_link(plug: {HTTP, opts}, port: 0, ip: :loopback, startup_log: false) - -{:ok, {_a, port}} = ThousandIsland.listener_info(pid) - -call_json = fn id, pad -> - Jason.encode!(%{ - "jsonrpc" => "2.0", - "id" => id, - "method" => "tools/call", - "params" => %{"name" => "echo", "arguments" => %{}}, - "_meta" => %{vkey => modern}, - "pad" => String.duplicate("x", pad) - }) -end - -req = fn method, body -> - "#{method} /mcp HTTP/1.1\r\nhost: localhost\r\ncontent-type: application/json\r\n" <> - "content-length: #{byte_size(body)}\r\nmcp-protocol-version: #{modern}\r\n" <> - "mcp-method: tools/call\r\nmcp-name: echo\r\n\r\n" <> body -end - -big = req.("POST", call_json.(1, over)) -second = req.("POST", call_json.(2, 0)) -payload = big <> second - -# The test's drain/2, verbatim, but reporting the RAW socket result instead of a verdict. -drain = fn drain, sock, acc, first_ms, quiet_ms -> - t = if acc == "", do: first_ms, else: quiet_ms - - case :gen_tcp.recv(sock, 0, t) do - {:ok, data} -> drain.(drain, sock, acc <> data, first_ms, quiet_ms) - {:error, reason} -> {acc, reason} - end -end - -run = fn concurrent?, econnreset? -> - base = [:binary, active: false, packet: :raw] - sockopts = if econnreset?, do: base ++ [show_econnreset: true], else: base - {:ok, sock} = :gen_tcp.connect(~c"127.0.0.1", port, sockopts, 5_000) - - send_res = - if concurrent? do - me = self() - spawn(fn -> send(me, {:sent, :gen_tcp.send(sock, payload)}) end) - :spawned - else - :gen_tcp.send(sock, payload) - end - - {acc, reason} = drain.(drain, sock, "", 10_000, 700) - - send_res = - if concurrent? do - receive do - {:sent, r} -> r - after - 5_000 -> :writer_still_running - end - else - send_res - end - - :gen_tcp.close(sock) - {byte_size(acc), reason, send_res, String.contains?(acc, "HTTP/1.1 403")} -end - -for {label, conc, ecr} <- [ - {"A send-all-then-read, show_econnreset default", false, false}, - {"B send-all-then-read, show_econnreset: true", false, true}, - {"C concurrent read+write, show_econnreset default", true, false}, - {"D concurrent read+write, show_econnreset: true", true, true} - ] do - results = for _ <- 1..n, do: run.(conc, ecr) - - tally = - results - |> Enum.frequencies() - |> Enum.sort_by(fn {_k, v} -> -v end) - - IO.puts("\n== #{label} (#{n} runs) ==") - IO.puts(" {bytes_received, recv_reason, send_result, saw_403?}") - - for {k, v} <- tally, do: IO.puts(" #{v}x #{inspect(k)}") - - bad = Enum.count(results, fn {_, _, _, saw} -> not saw end) - IO.puts(" 403 MISSING in #{bad}/#{n}") -end - -IO.puts("\nPROBE_DONE") ----- end of script ---- - -$ N=40 MIX_ENV=test mix run tools-scratch/drain_mechanism.exs - -21:21:04.900 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.908 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.909 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.909 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.910 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.910 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.910 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.910 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.911 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.912 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.912 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.912 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.913 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.913 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.913 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.914 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.915 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.915 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.916 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.916 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.917 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.917 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.918 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.918 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.918 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.918 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.919 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.919 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.919 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.920 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.920 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.920 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.921 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.921 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.922 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.922 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.922 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.923 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.923 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.923 [info] beam_mcp: refused by host authorize/1: :nope - -== A send-all-then-read, show_econnreset default (40 runs) == - {bytes_received, recv_reason, send_result, saw_403?} - 29x {297, :closed, :ok, true} - 11x {0, :closed, :ok, false} - 403 MISSING in 11/40 - -21:21:04.926 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.927 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.927 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.928 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.928 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.929 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.929 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.929 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.930 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.930 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.931 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.931 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.932 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.932 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.932 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.933 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.933 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.933 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.933 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.934 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.934 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.934 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.935 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.935 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.936 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.936 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.936 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.937 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.937 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.937 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.938 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.938 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.938 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.938 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.939 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.939 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.939 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.939 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.940 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.940 [info] beam_mcp: refused by host authorize/1: :nope - -== B send-all-then-read, show_econnreset: true (40 runs) == - {bytes_received, recv_reason, send_result, saw_403?} - 21x {297, :closed, :ok, true} - 11x {297, :econnreset, :ok, true} - 8x {0, :econnreset, :ok, false} - 403 MISSING in 8/40 - -21:21:04.940 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.940 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.941 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.941 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.941 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.942 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.942 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.942 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.943 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.943 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.943 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.943 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.944 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.944 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.944 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.944 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.945 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.945 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.945 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.945 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.946 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.946 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.946 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.947 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.947 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.947 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.948 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.948 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.948 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.948 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.948 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.949 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.949 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.949 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.949 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.950 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.950 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.950 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.951 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.951 [info] beam_mcp: refused by host authorize/1: :nope - -== C concurrent read+write, show_econnreset default (40 runs) == - {bytes_received, recv_reason, send_result, saw_403?} - 40x {297, :closed, :ok, true} - 403 MISSING in 0/40 - -21:21:04.951 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.952 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.952 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.952 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.952 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.953 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.953 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.953 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.953 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.954 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.954 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.954 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.955 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.955 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.956 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.956 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.956 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.956 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.957 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.957 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.957 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.958 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.958 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.958 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.958 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.959 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.959 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.960 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.960 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.960 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.960 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.961 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.961 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.961 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.962 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.962 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.962 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.963 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.963 [info] beam_mcp: refused by host authorize/1: :nope - -21:21:04.963 [info] beam_mcp: refused by host authorize/1: :nope - -== D concurrent read+write, show_econnreset: true (40 runs) == - {bytes_received, recv_reason, send_result, saw_403?} - 25x {297, :econnreset, :ok, true} - 15x {297, :closed, :ok, true} - 403 MISSING in 0/40 - -PROBE_DONE -PROBE_EXIT=0 diff --git a/slices/006-harness-honesty/logs/probe-loss-reason.txt b/slices/006-harness-honesty/logs/probe-loss-reason.txt deleted file mode 100644 index 08051df5..00000000 --- a/slices/006-harness-honesty/logs/probe-loss-reason.txt +++ /dev/null @@ -1,512 +0,0 @@ -background load: 32 busy loops on 32 cores -date: 2026-09-08T12:04:57Z -$ env N=250 MIX_ENV=test mix run /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/loss_site.exs - - -08:04:59.680 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.701 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.702 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.703 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.706 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.707 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.707 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.708 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.711 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.711 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.712 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.712 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.712 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.713 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.713 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.714 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.714 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.718 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.718 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.719 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.719 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.719 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.723 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.727 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.727 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.728 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.728 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.728 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.729 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.729 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.730 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.730 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.731 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.734 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.734 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.735 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.735 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.735 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.736 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.736 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.736 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.738 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.740 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.740 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.741 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.741 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.741 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.742 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.742 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.743 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.743 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.744 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.745 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.745 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.746 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.747 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.748 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.748 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.749 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.750 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.751 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.752 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.753 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.753 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.754 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.755 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.756 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.757 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.757 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.758 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.759 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.760 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.761 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.761 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.762 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.763 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.764 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.764 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.765 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.766 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.767 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.768 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.769 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.769 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.770 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.771 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.772 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.773 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.774 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.774 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.775 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.776 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.777 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.778 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.778 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.779 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.780 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.784 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.784 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.785 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.786 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.787 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.787 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.791 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.792 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.795 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.799 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.800 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.800 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.801 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.802 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.802 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.803 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.803 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.808 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.812 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.812 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.813 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.813 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.817 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.817 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.818 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.824 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.825 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.825 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.826 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.826 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.827 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.827 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.828 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.831 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.832 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.832 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.836 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.837 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.837 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.838 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.839 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.840 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.840 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.841 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.842 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.843 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.844 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.845 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.846 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.847 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.848 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.849 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.850 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.851 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.852 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.853 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.854 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.855 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.856 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.857 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.858 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.859 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.860 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.861 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.862 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.863 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.864 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.865 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.866 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.867 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.868 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.869 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.870 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.871 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.872 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.873 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.874 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.875 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.876 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.878 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.879 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.880 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.881 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.882 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.883 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.883 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.884 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.885 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.887 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.888 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.889 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.889 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.890 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.891 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.892 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.893 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.894 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.895 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.896 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.897 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.898 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.899 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.900 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.901 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.902 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.903 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.904 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.905 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.906 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.907 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.908 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.909 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.910 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.911 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.912 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.913 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.914 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.915 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.916 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.917 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.918 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.919 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.920 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.921 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.922 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.923 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.924 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.925 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.926 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.927 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.928 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.930 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.931 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.932 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.933 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.934 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.935 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.936 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.937 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.938 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.939 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.940 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.941 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.942 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.943 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.944 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.945 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.946 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.947 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.948 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.949 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.950 [info] beam_mcp: refused by host authorize/1: :nope - -08:04:59.951 [info] beam_mcp: refused by host authorize/1: :nope - -== 250 runs of the 9 MB refusal, active-mode client == - {bytes delivered to the process, end reason, socket stats, authorize/1 ran?} - 231x {297, :econnreset, {:error, :einval}, true} - 19x {0, :econnreset, {:error, :einval}, true} - -PROBE_DONE -EXIT=0 diff --git a/slices/006-harness-honesty/logs/probe-loss-site.txt b/slices/006-harness-honesty/logs/probe-loss-site.txt deleted file mode 100644 index 75940e6c..00000000 --- a/slices/006-harness-honesty/logs/probe-loss-site.txt +++ /dev/null @@ -1,132 +0,0 @@ -background load: 32 busy loops on 32 cores -date: 2026-09-08T01:51:18Z -$ env N=60 MIX_ENV=test mix run /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/loss_site.exs - - -21:51:20.074 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.102 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.106 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.111 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.112 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.113 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.113 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.114 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.118 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.119 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.120 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.122 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.124 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.125 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.126 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.126 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.128 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.129 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.129 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.130 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.133 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.137 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.141 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.142 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.142 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.143 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.145 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.147 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.148 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.149 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.152 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.152 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.154 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.154 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.155 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.156 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.156 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.161 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.161 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.162 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.162 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.163 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.163 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.166 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.167 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.169 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.173 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.173 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.173 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.174 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.175 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.175 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.175 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.176 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.179 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.179 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.183 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.184 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.187 [info] beam_mcp: refused by host authorize/1: :nope - -21:51:20.188 [info] beam_mcp: refused by host authorize/1: :nope - -== 60 runs of the 9 MB refusal, active-mode client == - {bytes delivered to the process, end reason, socket stats, authorize/1 ran?} - 57x {297, :econnreset, {:error, :einval}, true} - 3x {0, :econnreset, {:error, :einval}, true} - -PROBE_DONE -EXIT=0 diff --git a/slices/006-harness-honesty/logs/probe-mutate-dirty-target.txt b/slices/006-harness-honesty/logs/probe-mutate-dirty-target.txt deleted file mode 100644 index cbf720d5..00000000 --- a/slices/006-harness-honesty/logs/probe-mutate-dirty-target.txt +++ /dev/null @@ -1,31 +0,0 @@ -== the guard that would have stopped the round-2 contamination == -date: 2026-09-08T12:15:55Z - -PROBE: plant a leftover mutant in the target, exactly as a SIGKILLed run would leave it, -and check that the next invocation REFUSES rather than adopting it as the pristine. - -$ python3 tools/mutants/Mr2.py lib/beam_mcp/transport/http.ex # a leftover mutant -Mr2 applied -$ git status --porcelain lib/ - M lib/beam_mcp/transport/http.ex - -$ PASSES=1 ./tools/mutate.sh score Mc2 -REFUSING: lib/beam_mcp/transport/http.ex has uncommitted changes. -The pristine copy is taken from the working file, so scoring against a dirty target -risks adopting a leftover mutant as the baseline -- see the header. Commit or revert -it, or set MUTATE_ALLOW_DIRTY_TARGET=1 if you have checked it yourself. -SCORE_EXIT=1 - -WITHOUT THE GUARD this run would have copied the Mr2 mutant to $pristine, scored Mc2 on -top of it, and RESTORED Mr2 afterwards -- leaving the defect in the tree and calling it -the baseline. - -$ git checkout -- lib/beam_mcp/transport/http.ex # clear the planted mutant -(no line above = target clean again) - -$ PASSES=1 ./tools/mutate.sh score Mc2 # and now it runs -target: lib/beam_mcp/transport/http.ex -passes: 1 -tree: eff906ca76c6ce59d86c46018e376195ce150efd dirty=9 -Mc2 | 164 tests, 0 failures TEST_EXIT=0 -SCORE_EXIT=0 diff --git a/slices/006-harness-honesty/logs/probe-rate-mc8-load32-active.txt b/slices/006-harness-honesty/logs/probe-rate-mc8-load32-active.txt deleted file mode 100644 index e597d5e8..00000000 --- a/slices/006-harness-honesty/logs/probe-rate-mc8-load32-active.txt +++ /dev/null @@ -1,10091 +0,0 @@ -== green-rate-mc8-load32 == -command: mix test --max-cases 8 (x40 consecutive runs) -background load: 32 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=4 -date: 2026-09-08T01:44:34Z - ----- run 1 ---- -Running ExUnit with seed: 705440, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -21:44:36.501 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -21:44:37.088 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:37.089 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:37.089 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:44:37.214 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:44:37.258 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:44:37.419 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:44:37.446 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:37.447 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:37.447 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:44:37.576 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:44:37.577 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:44:37.578 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:44:37.593 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:44:37.596 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:44:37.752 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:44:37.803 [info] beam_mcp: refused by host authorize/1: :nope -. -21:44:37.855 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:37.855 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:37.856 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:44:40.291 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:44:41.006 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:44:41.751 [info] beam_mcp: refused by host authorize/1: :nope -. -21:44:41.761 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 5.8 seconds (1.9s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 269156, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:44:43.983 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -21:44:45.069 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:44:45.069 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:44:45.147 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:45.147 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:44:45.184 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:45.185 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:45.185 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:44:45.241 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:45.242 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:45.242 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:44:45.261 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:44:45.262 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:45.263 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:44:45.263 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:44:45.314 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -21:44:45.383 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:45.383 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -21:44:45.610 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:44:45.611 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:44:48.101 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:44:48.869 [info] beam_mcp: refused by host authorize/1: :nope -. -21:44:48.880 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:44:48.899 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 6.1 seconds (2.1s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 123737, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -21:44:51.876 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -21:44:52.684 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:44:52.803 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:44:52.877 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:44:52.900 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:52.901 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:44:52.961 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:44:53.016 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:44:53.083 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:53.083 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:44:53.206 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -21:44:53.344 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:53.344 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:44:53.344 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:44:53.345 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:53.346 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:53.346 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:44:53.397 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:44:53.398 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:44:53.399 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:44:56.239 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:44:56.251 [info] beam_mcp: refused by host authorize/1: :nope -. -21:44:56.354 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:44:56.372 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 5.7 seconds (2.0s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 729235, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:44:59.532 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -21:45:00.477 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:45:00.478 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:00.478 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:00.537 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:45:00.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:45:00.713 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:45:00.730 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:45:00.834 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:00.834 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:45:00.841 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:00.841 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:00.842 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:45:00.914 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:00.930 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:45:01.051 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:45:01.053 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:01.054 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:45:01.126 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:45:01.131 [info] beam_mcp: refused by host authorize/1: :nope -........... -21:45:03.724 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:45:03.835 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:45:03.880 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:45:05.316 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.3 seconds (2.2s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 878179, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:45:07.687 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -21:45:08.632 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:08.688 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:45:08.814 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:08.841 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:08.842 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:08.842 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:08.843 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:08.843 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:08.895 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:08.997 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:45:09.048 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -21:45:09.119 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:45:09.195 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:09.196 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:45:09.271 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:45:09.272 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:45:09.324 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:09.327 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:09.328 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:45:11.379 [info] beam_mcp: refused by host authorize/1: :nope -. -21:45:11.404 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:45:11.609 [info] beam_mcp: refused by host authorize/1: :nope -... -21:45:13.039 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 5.9 seconds (2.2s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 640151, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -21:45:15.308 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -21:45:16.425 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:45:16.478 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:16.478 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:16.482 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:45:16.493 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -21:45:16.555 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:45:16.606 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:16.607 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:16.607 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:45:16.615 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:45:16.627 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:16.628 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:16.644 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:16.725 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:45:16.778 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:45:16.779 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -21:45:16.780 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:45:16.831 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:16.831 [info] beam_mcp: refused by host authorize/1: :nope -............. -21:45:19.137 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:45:20.602 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:45:20.609 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:45:20.631 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 5.8 seconds (2.0s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 112504, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -21:45:22.815 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -21:45:23.450 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:45:23.576 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:23.577 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:23.577 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:45:23.591 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:45:23.660 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:45:23.679 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:45:23.700 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:45:23.752 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:45:23.803 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:45:23.969 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:24.021 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:45:24.090 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:45:24.108 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:24.108 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:45:24.108 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:45:24.110 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:24.111 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:24.111 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:45:26.204 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:45:26.225 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:45:27.843 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:45:27.866 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 5.5 seconds (1.8s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 503165, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -21:45:30.212 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:45:30.934 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:30.935 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:30.935 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -21:45:31.253 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:31.277 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:45:31.284 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:45:31.437 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:31.438 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:31.438 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:31.438 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:45:31.490 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:31.491 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:31.516 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:31.528 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:31.528 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -21:45:31.626 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:31.626 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:45:31.678 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:31.678 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:45:33.991 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:45:34.886 [info] beam_mcp: refused by host authorize/1: :nope -. -21:45:34.895 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:45:34.903 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 5.9 seconds (2.0s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 264658, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -21:45:38.180 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:45:38.965 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:45:39.018 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:39.018 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:39.018 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:39.084 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:45:39.144 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:45:39.333 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:39.333 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:39.334 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:39.334 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:45:39.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:45:39.491 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:39.491 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:45:39.542 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:45:39.546 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -21:45:39.615 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:45:39.632 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:45:39.633 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:39.634 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:45:42.299 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:45:43.173 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:45:43.208 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:45:43.925 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 6.3 seconds (2.0s async, 4.2s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 456934, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -21:45:46.298 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -21:45:46.950 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:46.951 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:45:46.978 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -21:45:47.097 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:45:47.115 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:47.139 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:47.139 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:45:47.143 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:47.143 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:47.144 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:45:47.265 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:47.266 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:47.269 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:45:47.321 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:45:47.388 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:47.389 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:45:47.440 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:45:47.491 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:45:47.616 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -21:45:50.836 [info] beam_mcp: refused by host authorize/1: :nope -. -21:45:50.846 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:45:50.855 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:45:50.865 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 5.9 seconds (2.0s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 193668, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -21:45:53.910 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:45:54.863 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:54.864 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:54.925 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:45:54.925 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:45:54.927 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:54.927 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:54.928 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:45:54.980 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:54.980 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:45:55.050 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:45:55.050 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:45:55.101 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:55.102 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:45:55.102 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:45:55.173 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:45:55.239 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:45:55.245 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:45:55.285 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -21:45:55.440 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:45:58.039 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:45:58.088 [info] beam_mcp: refused by host authorize/1: :nope -. -21:45:58.219 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:45:58.952 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 6.2 seconds (2.0s async, 4.2s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 236807, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:46:02.093 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:46:02.675 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:02.729 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:46:02.745 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:46:02.873 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:46:02.936 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:46:02.936 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:46:03.058 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:03.059 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:03.060 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:46:03.091 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:03.091 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:46:03.120 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:03.121 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:03.122 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:46:03.189 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:46:03.242 [info] beam_mcp: refused by host authorize/1: :nope -........... -21:46:03.345 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:03.346 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:03.346 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:46:05.770 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:46:05.821 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:46:07.262 [info] beam_mcp: refused by host authorize/1: :nope -. -21:46:07.270 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 5.8 seconds (1.8s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 767360, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -21:46:09.581 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:46:10.325 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:10.420 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:46:10.476 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:46:10.592 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:10.593 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:10.620 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:10.632 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:46:10.632 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:46:10.636 [info] beam_mcp: refused by host authorize/1: :nope -... -21:46:10.687 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:46:10.739 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:46:10.809 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:10.809 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:46:10.861 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:46:10.917 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:46:10.949 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:46:11.051 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:11.052 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:11.052 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:46:14.225 [info] beam_mcp: refused by host authorize/1: :nope -. -21:46:14.238 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:46:14.404 [info] beam_mcp: refused by host authorize/1: :nope -. -21:46:14.414 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 6.2 seconds (2.1s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 725936, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:46:17.557 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -21:46:18.229 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:46:18.288 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:46:18.368 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:18.369 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:18.369 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:46:18.438 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:18.439 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:18.440 [info] beam_mcp: refused by host authorize/1: :nope -......... -21:46:18.514 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:46:18.637 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:18.637 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:18.638 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:18.638 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:18.639 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:46:18.707 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:46:18.708 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:18.709 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:46:18.709 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:46:18.711 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:46:21.955 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:46:21.980 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:46:22.878 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:46:22.911 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 6.0 seconds (1.9s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 455695, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -21:46:25.210 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -21:46:25.970 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:46:26.014 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:26.028 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:46:26.089 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:26.147 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:26.159 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:46:26.215 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:26.215 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:26.217 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:26.235 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:46:26.312 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:26.314 [info] beam_mcp: refused by host authorize/1: :nope -............. -21:46:26.417 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:26.421 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:46:26.473 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................... -21:46:26.678 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:26.680 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:46:26.703 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:46:26.754 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:46:29.278 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:46:29.286 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:46:30.013 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:46:30.876 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.2 seconds (2.1s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 429411, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:46:33.321 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:46:34.109 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:34.197 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:46:34.319 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:46:34.334 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:46:34.342 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:34.365 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:34.416 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:46:34.468 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:46:34.519 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:34.520 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:46:34.572 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:34.572 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:34.572 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:34.573 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:46:34.623 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:46:34.707 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:46:34.769 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:46:34.839 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:34.842 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:46:38.095 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:46:38.986 [info] beam_mcp: refused by host authorize/1: :nope -. -21:46:38.993 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:46:39.003 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 6.4 seconds (2.2s async, 4.2s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 620169, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -21:46:41.493 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -21:46:42.340 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:46:42.413 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:46:42.463 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:42.468 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:42.486 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:46:42.488 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:42.500 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:46:42.603 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:46:42.612 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:46:42.715 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:46:42.715 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:42.716 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:42.767 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:42.768 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:46:42.807 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:42.813 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:46:42.864 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:42.865 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:42.865 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:46:45.390 [info] beam_mcp: refused by host authorize/1: :nope -... -21:46:46.110 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:46:46.120 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:46:46.282 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 6.1 seconds (2.0s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 109056, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:46:49.953 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:46:50.671 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:46:50.743 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................ -21:46:50.907 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:50.907 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:46:50.974 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:50.975 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:46:51.054 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:46:51.076 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:51.083 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:51.083 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:51.099 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:46:51.115 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:51.115 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:51.116 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:51.116 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:51.167 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:46:51.269 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:51.281 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:51.281 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:46:54.202 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:46:54.220 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:46:54.339 [info] beam_mcp: refused by host authorize/1: :nope -. -21:46:54.353 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 6.4 seconds (1.9s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 445166, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -21:46:58.316 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:46:59.201 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:46:59.223 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:59.224 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:46:59.228 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:59.229 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:59.229 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:59.230 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:46:59.231 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:46:59.296 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:46:59.347 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:46:59.417 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:46:59.424 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:46:59.475 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:46:59.679 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:46:59.686 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:46:59.718 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:46:59.769 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:46:59.769 [info] beam_mcp: refused by host authorize/1: :nope -... -21:46:59.820 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:47:02.044 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:47:02.053 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:47:02.202 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:02.216 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 6.0 seconds (2.2s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 147268, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:47:05.785 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:47:06.721 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:06.721 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:47:06.761 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:47:06.762 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:06.763 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:06.763 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:47:06.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:47:06.899 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:47:06.970 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:47:07.002 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:47:07.002 [info] beam_mcp: refused by host authorize/1: :nope -... -21:47:07.155 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:47:07.206 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:07.229 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:47:07.230 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:47:07.282 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:47:07.306 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:07.307 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:07.307 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -21:47:10.275 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:47:10.309 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:47:10.318 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:47:11.171 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:441 - ** (RuntimeError) The connection ended (:econnreset) after 0 complete response(s), and this exchange was waiting for 1. 0 byte(s) were read: "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:205: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:168: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:454: (test) - - -Finished in 5.8 seconds (2.0s async, 3.7s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 21 ---- -Running ExUnit with seed: 759732, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -21:47:13.582 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:47:14.244 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:47:14.325 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:47:14.430 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:14.437 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:47:14.455 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:47:14.574 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:47:14.574 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:47:14.677 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:47:14.728 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:47:14.783 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:47:14.783 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:14.784 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:14.784 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:14.785 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:14.785 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:14.799 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:47:14.877 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:47:14.948 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:47:14.949 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -21:47:17.116 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -21:47:17.893 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:17.898 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:47:18.080 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 5.8 seconds (1.9s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 232189, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -21:47:21.042 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:47:21.890 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:21.890 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:21.890 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:21.922 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:21.964 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:21.966 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:21.979 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:21.983 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:21.990 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:47:22.010 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:47:22.030 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:47:22.030 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -21:47:22.150 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:22.220 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:22.221 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:47:22.374 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:47:22.477 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -21:47:22.529 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:22.529 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................... -21:47:26.168 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:47:26.186 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:26.373 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:26.384 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 5.9 seconds (2.1s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 977309, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -21:47:28.687 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -21:47:29.574 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:29.677 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:47:29.731 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -21:47:29.835 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:29.835 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:29.836 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:29.836 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:47:29.887 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:29.986 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:29.986 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:47:30.138 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:47:30.172 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:47:30.274 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:30.275 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:30.275 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:47:30.276 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:47:30.277 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:47:30.331 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:30.355 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:47:32.665 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:47:32.683 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:47:33.619 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:33.630 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 6.2 seconds (2.2s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 880361, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:47:36.676 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -21:47:37.554 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:47:37.555 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -21:47:37.675 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:47:37.679 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:37.679 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:37.679 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:47:37.692 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:37.711 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:47:37.722 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:37.722 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:37.723 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:47:37.744 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:47:37.958 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:47:38.062 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:47:38.081 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:47:38.081 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:38.081 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:47:38.203 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:47:38.204 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:47:41.314 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:47:41.323 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:47:42.037 [info] beam_mcp: refused by host authorize/1: :nope -... -21:47:42.233 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 6.1 seconds (2.1s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 896118, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -21:47:44.815 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:47:45.643 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:45.673 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:47:45.772 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:47:45.789 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:45.797 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:47:45.798 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:45.799 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:45.799 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:45.800 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:47:45.917 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:45.928 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:47:45.979 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:45.980 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:45.980 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:46.031 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:47:46.133 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:46.184 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:47:46.185 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:46.236 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -21:47:49.788 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:47:49.795 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:47:50.010 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:50.019 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 5.9 seconds (2.2s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 480338, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -21:47:52.240 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:47:53.140 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -21:47:53.180 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:47:53.300 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:47:53.371 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:47:53.371 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:47:53.372 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:53.372 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:47:53.376 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:53.385 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:47:53.406 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:47:53.406 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:53.427 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:47:53.502 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:47:53.605 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:53.609 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:47:53.611 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:47:53.714 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:47:53.737 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:47:53.789 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:47:56.064 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:47:56.817 [info] beam_mcp: refused by host authorize/1: :nope -. -21:47:56.827 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:47:57.743 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.0 seconds (2.0s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 375992, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:48:00.113 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -21:48:00.763 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:00.763 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:48:00.864 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:48:00.927 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:48:01.029 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:01.030 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:01.062 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:01.063 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:48:01.185 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:48:01.214 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:01.216 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:01.268 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:01.268 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:01.269 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:01.269 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:48:01.320 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:48:01.372 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:48:01.410 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:01.410 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:48:04.422 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:48:04.436 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:48:04.453 [info] beam_mcp: refused by host authorize/1: :nope -... -21:48:04.633 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 5.7 seconds (1.8s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 945215, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:48:07.672 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -21:48:08.558 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:48:08.609 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:08.610 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:08.610 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:48:08.730 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:48:08.756 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:48:08.771 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:48:08.772 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:48:08.773 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:08.773 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:08.773 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:08.773 [info] beam_mcp: refused by host authorize/1: :nope -................... -21:48:08.966 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:48:08.991 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:48:08.993 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:08.993 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:48:09.003 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:09.054 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -21:48:09.160 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:48:12.689 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:12.698 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:48:13.434 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:48:13.597 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.4 seconds (1.9s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 174432, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:48:15.860 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:48:16.823 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:16.865 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:48:16.866 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:48:16.940 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:16.940 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:48:16.998 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:48:16.999 [info] beam_mcp: refused by host authorize/1: :nope -......... -21:48:17.159 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:48:17.191 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:17.192 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:17.192 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:17.193 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:17.193 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:17.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:48:17.295 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:48:17.332 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:48:17.402 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:17.403 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:17.403 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -21:48:19.678 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:48:21.116 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:48:21.331 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:21.339 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 5.9 seconds (2.0s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 959178, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:48:23.778 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:48:24.679 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:48:24.680 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:48:24.753 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:48:24.826 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:24.827 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:48:24.935 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:48:25.038 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:48:25.043 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:48:25.044 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:25.044 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:25.045 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:25.045 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:48:25.114 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:48:25.189 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:48:25.240 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:48:25.257 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:25.258 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:25.258 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:25.258 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:48:28.684 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:28.706 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:48:28.738 [info] beam_mcp: refused by host authorize/1: :nope -... -21:48:29.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 6.3 seconds (2.1s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 4635, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:48:31.791 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -21:48:32.232 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:32.335 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:32.336 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:48:32.362 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:48:32.447 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:32.447 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:48:32.451 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:48:32.474 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:32.474 [info] beam_mcp: refused by host authorize/1: :nope -........... -21:48:32.590 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:48:32.591 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:48:32.643 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:32.643 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:32.644 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:48:32.662 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:48:32.724 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:32.724 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:48:32.808 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:32.809 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -21:48:35.790 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:35.812 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -21:48:37.258 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:37.270 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 6.1 seconds (1.7s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 39028, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -21:48:39.964 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:48:40.708 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:48:40.710 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:40.711 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:48:40.797 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:48:40.843 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:48:40.926 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:40.927 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:48:40.978 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:40.979 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:40.979 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -21:48:41.091 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:41.093 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:48:41.093 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:41.094 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:41.102 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:48:41.126 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:48:41.229 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:48:41.331 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:48:41.365 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:48:44.402 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:44.413 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:48:45.875 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:48:45.887 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.6 seconds (2.1s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 484814, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:48:48.247 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -21:48:48.991 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:48:48.995 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:48.999 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:49.000 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:48:49.259 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:49.278 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:48:49.355 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:48:49.414 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:48:49.414 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:49.415 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:49.430 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:48:49.455 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:48:49.465 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:48:49.516 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:48:49.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:48:49.669 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:48:49.721 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:49.723 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:48:49.736 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:48:52.099 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:48:53.540 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:48:53.693 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:48:53.735 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.1 seconds (2.1s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 353503, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:48:56.084 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:48:56.913 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:48:56.974 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:56.975 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:56.975 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:48:57.040 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:48:57.116 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:48:57.319 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:48:57.323 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:48:57.405 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:48:57.432 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:57.432 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:48:57.433 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:48:57.443 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:48:57.444 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:48:57.444 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:48:57.444 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:48:57.445 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:48:57.498 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:48:57.551 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:48:59.895 [info] beam_mcp: refused by host authorize/1: :nope -. -21:48:59.904 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:48:59.926 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:49:00.651 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 5.8 seconds (2.0s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 16184, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:49:03.875 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................................. -21:49:04.717 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:04.719 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:04.720 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:49:04.770 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:49:04.853 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:04.854 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:49:04.963 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:04.963 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:04.963 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:49:05.047 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:49:05.048 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:05.056 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:49:05.070 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:49:05.070 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:05.070 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:49:05.081 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:05.082 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:49:05.137 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:49:05.188 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:49:07.986 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:49:08.711 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:49:08.889 [info] beam_mcp: refused by host authorize/1: :nope - - - -21:49:08.909 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:441 - ** (RuntimeError) The connection ended (:econnreset) after 0 complete response(s), and this exchange was waiting for 1. 0 byte(s) were read: "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:205: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:168: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:454: (test) - -... -Finished in 6.3 seconds (1.9s async, 4.4s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 36 ---- -Running ExUnit with seed: 286179, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:49:11.972 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:49:12.990 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:49:13.046 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:49:13.053 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:13.073 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:49:13.141 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:13.142 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:13.142 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:49:13.220 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -21:49:13.425 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:13.426 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:13.426 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:49:13.478 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -21:49:13.553 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:49:13.554 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:49:13.564 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:49:13.565 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:49:13.585 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:13.603 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:13.604 [info] beam_mcp: refused by host authorize/1: :nope -........... -21:49:15.780 [info] beam_mcp: refused by host authorize/1: :nope -... -21:49:16.527 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:49:17.243 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:49:17.288 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 5.8 seconds (2.1s async, 3.6s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 970175, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................... -21:49:19.867 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:49:20.718 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:20.719 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:49:20.877 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:49:20.910 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:49:20.926 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:49:20.927 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:49:20.941 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:49:20.942 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:20.942 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:49:21.049 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:49:21.051 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:21.051 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:21.052 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:49:21.058 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................... -21:49:21.067 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:49:21.068 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -21:49:21.273 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:49:21.326 [info] beam_mcp: refused by host authorize/1: :nope -. -21:49:21.377 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:49:24.692 [info] beam_mcp: refused by host authorize/1: :nope -. -21:49:24.700 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:49:24.717 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:49:24.725 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 6.2 seconds (2.2s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 59162, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:49:27.904 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -21:49:28.641 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:28.641 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:49:28.765 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:49:28.818 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:49:28.880 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:49:28.957 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:49:29.047 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:49:29.098 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:29.101 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:49:29.152 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:49:29.153 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:29.153 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:29.153 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:29.154 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:49:29.220 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:49:29.272 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:29.272 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:49:29.273 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:49:29.292 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:49:31.363 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:49:31.505 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:49:31.531 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:49:32.970 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 5.7 seconds (2.0s async, 3.6s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 523280, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:49:35.430 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:49:36.279 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:49:36.295 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:49:36.339 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:49:36.391 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:36.392 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:49:36.411 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:49:36.462 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:36.463 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:36.463 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:36.463 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:36.465 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:49:36.468 [info] beam_mcp: refused by host authorize/1: :nope -............... -21:49:36.522 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -21:49:36.574 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:49:36.574 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:49:36.595 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:49:36.776 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:49:36.827 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:49:36.896 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:49:39.281 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:49:39.405 [info] beam_mcp: refused by host authorize/1: :nope - -21:49:39.416 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:441 - ** (RuntimeError) The connection ended (:econnreset) after 0 complete response(s), and this exchange was waiting for 1. 0 byte(s) were read: "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:205: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:168: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:454: (test) - -.. -21:49:40.139 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 6.0 seconds (2.1s async, 3.9s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 40 ---- -Running ExUnit with seed: 416162, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:49:43.197 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:49:43.914 [info] beam_mcp: refused by host authorize/1: :nope -........ -21:49:44.066 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:49:44.072 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:49:44.167 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:44.168 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:49:44.283 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:44.284 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:44.284 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:44.284 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -21:49:44.479 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:49:44.481 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:44.482 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:49:44.509 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:49:44.561 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:44.562 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:49:44.562 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:49:44.614 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:49:44.665 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:49:44.677 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:49:46.975 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:405: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:49:46.999 [info] beam_mcp: refused by host authorize/1: :nope -... -21:49:48.424 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:49:48.563 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 5.9 seconds (2.0s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 - -== green-rate-mc8-load32: 3 run(s) of 40 exited non-zero == diff --git a/slices/006-harness-honesty/logs/probe-rate-mc8-load32-passive.txt b/slices/006-harness-honesty/logs/probe-rate-mc8-load32-passive.txt deleted file mode 100644 index fc82ab16..00000000 --- a/slices/006-harness-honesty/logs/probe-rate-mc8-load32-passive.txt +++ /dev/null @@ -1,11319 +0,0 @@ -== probe-rate-mc8-load32-fixed == -command: mix test --max-cases 8 (x40 consecutive runs) -background load: 32 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=4 -date: 2026-09-08T01:36:41Z - ----- run 1 ---- -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 964178, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.......................................... -21:36:43.656 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -... -21:36:44.409 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:36:44.435 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:44.439 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -21:36:44.490 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:36:44.491 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:36:44.491 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:36:44.497 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:36:44.501 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -21:36:44.566 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:36:44.570 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:36:44.570 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:44.570 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:36:44.621 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:36:44.705 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:36:44.758 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:44.758 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:36:44.772 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:44.773 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:36:44.876 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:36:47.905 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:36:47.911 [info] beam_mcp: refused by host authorize/1: :nope -. -21:36:47.918 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:36:48.803 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 5.6 seconds (1.8s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 229352, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.................................... -21:36:50.831 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -21:36:51.754 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -.. -21:36:51.839 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:51.840 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:51.840 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:36:51.841 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:51.907 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:36:51.908 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:36:51.909 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:36:51.938 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:36:51.993 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:36:52.015 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:36:52.015 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............................ -21:36:52.126 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:52.127 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:36:52.127 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:36:52.193 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:36:52.300 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:52.300 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:52.301 [info] beam_mcp: refused by host authorize/1: :nope -..................... -21:36:56.019 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:36:56.075 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:36:56.262 [info] beam_mcp: refused by host authorize/1: :nope -. -21:36:56.267 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 5.8 seconds (2.0s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 794276, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................ warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.............................. -21:36:58.601 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:36:59.402 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -...... -21:36:59.481 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:59.482 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:36:59.489 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:36:59.540 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:36:59.591 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:59.592 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:59.592 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:36:59.643 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:36:59.647 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:36:59.662 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:59.663 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:59.663 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:36:59.663 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:36:59.714 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:36:59.867 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:36:59.867 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:36:59.991 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:36:59.998 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -21:37:02.696 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:02.806 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:02.812 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:37:02.863 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 6.2 seconds (2.1s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 785197, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -..................................... -21:37:06.604 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -............. -21:37:07.291 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:07.292 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:37:07.370 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:07.371 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:07.372 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:37:07.425 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:07.440 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:07.459 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:07.459 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:07.460 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:37:07.641 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:07.649 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:37:07.649 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:37:07.650 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:07.650 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:07.650 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:37:07.752 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:07.753 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -21:37:07.868 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:37:11.142 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:11.152 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:37:11.163 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:37:11.175 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 6.6 seconds (1.9s async, 4.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 104376, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................ warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................... -21:37:14.971 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -. -21:37:15.706 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:37:15.805 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:15.806 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:37:15.863 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:37:15.868 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:37:15.884 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:15.899 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:15.951 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:37:16.018 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:16.019 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:16.019 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:16.020 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:16.020 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:16.020 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:37:16.020 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:37:16.075 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:37:16.126 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:16.127 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................... -21:37:16.367 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:37:18.972 [info] beam_mcp: refused by host authorize/1: :nope -... -21:37:19.695 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:37:19.722 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:37:20.526 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.2 seconds (2.0s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 4172, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................... -21:37:22.848 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -21:37:23.572 [info] beam_mcp: refused by host authorize/1: :nope -... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -. -21:37:23.623 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:37:23.688 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:23.689 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:23.689 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:23.690 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:23.690 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:37:23.697 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:23.698 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:37:23.709 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:37:23.710 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:37:23.752 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:23.753 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:37:23.764 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:37:23.870 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:23.871 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -21:37:23.998 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:24.011 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:37:24.118 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -21:37:27.035 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:27.044 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:37:27.770 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:37:28.625 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.4 seconds (2.0s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 179422, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -.................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -...................... -21:37:30.870 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -21:37:31.600 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -..... -21:37:31.689 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:31.690 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:31.704 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:37:31.807 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:37:31.845 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:37:31.896 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:37:31.947 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:37:31.958 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:37:31.959 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:32.010 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:37:32.011 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:37:32.114 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:32.117 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:32.117 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:37:32.139 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:32.190 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:32.190 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:37:32.191 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -21:37:35.667 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:35.678 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:35.684 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -21:37:36.445 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 6.0 seconds (1.8s async, 4.2s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 12302, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................. -21:37:38.732 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -21:37:39.732 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:37:39.741 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -. -21:37:39.773 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:37:39.774 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:39.774 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:37:39.829 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:37:39.935 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:37:39.957 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:39.957 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:37:39.958 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:39.958 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:39.958 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:37:39.974 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:39.984 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:40.044 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:40.098 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:37:40.118 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:37:40.221 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:37:40.272 [info] beam_mcp: refused by host authorize/1: :nope -...................... -21:37:44.295 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:37:44.439 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:37:45.197 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:45.206 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 6.9 seconds (2.1s async, 4.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 693362, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -.................. warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................ -21:37:47.378 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:37:48.196 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:37:48.198 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:48.201 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -. -21:37:48.289 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:37:48.329 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:48.344 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:48.395 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:37:48.469 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:48.470 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:48.470 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:48.471 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:48.494 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:37:48.563 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:37:48.713 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:48.714 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:37:48.824 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:48.824 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:37:48.825 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -21:37:48.929 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:37:51.653 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:37:51.670 [info] beam_mcp: refused by host authorize/1: :nope -... -21:37:51.869 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:37:52.586 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 6.4 seconds (2.1s async, 4.3s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 803380, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -............... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................. -21:37:55.490 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:37:56.337 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:37:56.392 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:56.415 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -. -21:37:56.441 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:37:56.519 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:37:56.580 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:37:56.631 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:37:56.688 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:37:56.693 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:56.693 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:56.710 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:37:56.715 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:37:56.716 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:37:56.770 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:37:56.827 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:56.827 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:37:56.827 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:37:56.878 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............................. -21:37:57.059 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:37:59.281 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:37:59.406 [info] beam_mcp: refused by host authorize/1: :nope -. -21:37:59.414 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:38:00.868 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 5.8 seconds (2.0s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 372199, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.......................................... -21:38:03.199 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -.. -21:38:03.971 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:38:03.971 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:03.972 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:03.972 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:04.035 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:04.049 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:04.050 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:38:04.067 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:04.069 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:04.070 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:04.087 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:04.088 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:04.117 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:04.117 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:38:04.220 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:38:04.273 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -21:38:04.290 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:04.291 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:04.394 [info] beam_mcp: refused by host authorize/1: :nope -...................... -21:38:06.980 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:38:06.989 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:38:07.005 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:38:07.892 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 6.0 seconds (2.0s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 106326, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -.................. warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................. -21:38:10.884 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:38:11.600 [info] beam_mcp: refused by host authorize/1: :nope - warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -..... -21:38:11.688 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:11.689 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:11.754 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:11.759 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:11.811 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:11.863 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:11.922 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:38:11.974 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:38:12.039 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:38:12.053 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:12.057 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:12.057 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:12.057 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:12.078 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:12.089 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................... -21:38:12.192 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:12.262 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:38:12.268 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:38:14.402 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:38:15.275 [info] beam_mcp: refused by host authorize/1: :nope -... -21:38:16.005 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:38:16.021 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 5.7 seconds (1.9s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 591159, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................................. -21:38:18.324 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:38:19.098 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:19.099 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:38:19.249 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:19.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:38:19.339 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:38:19.396 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:38:19.399 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:19.402 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:19.402 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:19.406 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:38:19.457 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:19.458 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:19.458 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:38:19.464 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................................. -21:38:19.679 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:19.679 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:38:19.753 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:19.765 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:19.780 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:38:22.396 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:38:22.435 [info] beam_mcp: refused by host authorize/1: :nope -... -21:38:23.153 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:38:24.054 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.2 seconds (2.0s async, 4.2s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 515346, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -. warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................... -21:38:26.176 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:38:27.022 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:38:27.098 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:38:27.164 [info] beam_mcp: refused by host authorize/1: :nope -. -21:38:27.240 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:38:27.357 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:27.358 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:27.359 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:27.359 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:27.360 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -21:38:27.360 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................ -21:38:27.421 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:38:27.483 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:27.500 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:27.500 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:38:27.552 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:27.553 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:27.553 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:27.606 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:27.610 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:38:30.048 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:38:30.773 [info] beam_mcp: refused by host authorize/1: :nope -. -21:38:30.954 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:38:31.005 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 6.0 seconds (1.9s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 240175, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -.................. warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.......................... -21:38:34.107 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:38:34.843 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -...... -21:38:34.953 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:38:35.055 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:38:35.106 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:38:35.166 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -21:38:35.166 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:38:35.166 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:38:35.182 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:35.186 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:38:35.237 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:35.238 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:35.253 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:35.254 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:35.254 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:35.257 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:35.257 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:35.258 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -21:38:35.502 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:35.525 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:38:38.342 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:38:38.447 [info] beam_mcp: refused by host authorize/1: :nope -... -21:38:38.479 [info] beam_mcp: refused by host authorize/1: :nope -. -21:38:38.488 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 6.4 seconds (2.0s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 496173, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.............................. -21:38:42.377 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:38:43.146 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:43.166 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:38:43.167 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false - warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -....................... -21:38:43.427 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:43.478 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:43.489 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:43.548 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:38:43.599 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:43.600 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:43.620 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:43.620 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:38:43.632 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:38:43.665 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:43.666 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:38:43.718 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:43.718 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:43.719 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:43.738 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:38:43.840 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:38:46.346 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:38:47.065 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:38:47.107 [info] beam_mcp: refused by host authorize/1: :nope -. -21:38:47.234 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 6.2 seconds (2.1s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 472148, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................................. -21:38:50.244 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:38:50.982 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:38:51.047 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:38:51.127 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:38:51.139 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:38:51.157 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:51.158 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:38:51.210 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:51.210 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:51.210 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:38:51.314 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:38:51.325 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:51.339 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:51.390 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:38:51.442 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:51.544 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:38:51.545 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:51.545 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:51.545 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:51.582 [info] beam_mcp: refused by host authorize/1: :nope -.............. -21:38:55.230 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:38:55.250 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:38:55.369 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:38:56.085 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.3 seconds (1.9s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 652458, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............ -21:38:58.399 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:38:59.456 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:59.484 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:59.500 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:38:59.611 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:38:59.666 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:59.670 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:59.670 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:38:59.762 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:38:59.815 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:38:59.816 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:38:59.918 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -21:38:59.938 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:38:59.989 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:38:59.996 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:38:59.996 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:38:59.997 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:39:00.048 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:00.048 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:00.048 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:39:02.367 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:39:03.978 [info] beam_mcp: refused by host authorize/1: :nope - -21:39:03.994 [info] beam_mcp: refused by host authorize/1: :nope - -21:39:04.000 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:416 - ** (RuntimeError) The connection ended (:closed) after 0 complete response(s), and this exchange was waiting for 1. - - 0 byte(s) were read: - - "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:187: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:149: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:429: (test) - -..... -Finished in 6.1 seconds (2.2s async, 3.9s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 19 ---- -Running ExUnit with seed: 576466, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -......................................... -21:39:06.343 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -21:39:07.003 [info] beam_mcp: refused by host authorize/1: :nope -.......... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:39:07.098 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:07.099 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:07.160 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:39:07.224 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:07.277 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:39:07.279 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:07.280 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:07.280 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:07.280 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............................. -21:39:07.461 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:39:07.512 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:07.687 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:39:07.688 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:39:07.689 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:07.699 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:39:07.704 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:39:07.715 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:07.715 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:39:09.891 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:39:10.612 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:39:10.743 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:39:11.483 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 5.7 seconds (1.9s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 44682, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -...................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.......... -21:39:13.783 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -21:39:14.402 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -.... -21:39:14.504 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:14.505 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:14.505 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:39:14.510 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:39:14.510 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:39:14.516 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:14.535 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:39:14.590 [info] beam_mcp: refused by host authorize/1: :nope -......... -21:39:14.726 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:14.752 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:39:14.775 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:39:14.825 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:14.826 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:14.880 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:39:15.035 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:15.036 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:39:15.037 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:39:15.055 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:39:18.009 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:39:18.032 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:39:18.043 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:39:19.683 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 6.4 seconds (1.8s async, 4.6s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 399637, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................. warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................ -21:39:22.399 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -21:39:23.270 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:39:23.288 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:39:23.337 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:23.390 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:39:23.414 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:23.425 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:39:23.455 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:23.515 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:39:23.566 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:39:23.567 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:23.567 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:23.568 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:39:23.673 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:39:23.739 [info] beam_mcp: refused by host authorize/1: :nope -........................ -21:39:23.844 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:23.845 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:23.897 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:39:23.900 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:39:23.970 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:39:26.870 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:39:27.060 [info] beam_mcp: refused by host authorize/1: :nope - -21:39:27.074 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:416 - ** (RuntimeError) The connection ended (:closed) after 0 complete response(s), and this exchange was waiting for 1. - - 0 byte(s) were read: - - "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:187: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:149: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:429: (test) - -.. -21:39:27.107 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 6.2 seconds (2.3s async, 3.8s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 22 ---- -Running ExUnit with seed: 464450, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................................ -21:39:30.336 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:39:31.271 [info] beam_mcp: refused by host authorize/1: :nope -... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -.... -21:39:31.411 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:39:31.475 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:39:31.505 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:31.506 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:39:31.547 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:39:31.566 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:31.567 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:39:31.673 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:39:31.673 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:39:31.749 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:39:31.818 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:39:31.872 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:39:31.926 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:31.926 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:39:31.927 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:31.927 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:31.928 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:31.980 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:39:35.031 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:39:35.202 [info] beam_mcp: refused by host authorize/1: :nope - -21:39:35.210 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:416 - ** (RuntimeError) The connection ended (:closed) after 0 complete response(s), and this exchange was waiting for 1. - - 0 byte(s) were read: - - "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:187: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:149: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:429: (test) - -... -21:39:35.953 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 6.9 seconds (2.2s async, 4.7s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 23 ---- -Running ExUnit with seed: 235265, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -.................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.......................... -21:39:39.318 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -...... -21:39:40.268 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:40.268 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:39:40.371 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:39:40.524 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:40.524 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:40.525 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:39:40.581 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:40.587 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:39:40.605 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:40.605 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:39:40.607 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:40.607 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:40.607 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:40.608 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:40.608 [info] beam_mcp: refused by host authorize/1: :nope -................ -21:39:40.677 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:40.695 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:40.695 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:39:40.696 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............................... -21:39:43.608 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:416 - ** (RuntimeError) The connection ended (:closed) after 0 complete response(s), and this exchange was waiting for 1. - - 0 byte(s) were read: - - "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:187: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:149: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:429: (test) - -. -21:39:44.331 [info] beam_mcp: refused by host authorize/1: :nope -... -21:39:45.059 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:39:45.068 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 6.5 seconds (2.3s async, 4.2s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 24 ---- -Running ExUnit with seed: 740347, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................... -21:39:47.538 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -21:39:48.627 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -........ -21:39:48.720 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:48.720 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:48.721 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:39:48.721 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:48.734 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:48.740 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:39:48.798 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:39:48.798 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:48.799 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:48.866 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:39:49.054 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:39:49.071 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:39:49.152 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:39:49.153 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:39:49.154 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:39:49.217 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:39:49.218 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:39:49.218 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:39:52.061 [info] beam_mcp: refused by host authorize/1: :nope -. -21:39:52.071 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:39:52.824 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:39:53.550 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.5 seconds (2.3s async, 4.2s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 25156, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -......................................... -21:39:56.054 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:39:56.751 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:39:56.766 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false - warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -. -21:39:56.897 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:56.897 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:39:56.898 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:56.898 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:56.898 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:39:56.969 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:56.969 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:56.970 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:39:56.991 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:39:57.117 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:39:57.217 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:39:57.277 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:39:57.277 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:57.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:39:57.278 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:39:57.278 [info] beam_mcp: refused by host authorize/1: :nope -.................. -21:39:57.484 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:40:00.414 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:40:00.420 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:40:00.609 [info] beam_mcp: refused by host authorize/1: :nope -. -21:40:00.621 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 5.9 seconds (2.1s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 137647, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -..................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.......... -21:40:03.858 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -21:40:04.561 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:04.613 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -............ -21:40:04.742 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:04.750 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:04.751 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:40:04.752 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:40:04.846 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:40:04.898 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:04.904 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:40:04.904 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:40:04.905 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:40:04.905 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:40:04.956 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:40:05.007 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:05.007 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:05.008 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:40:05.087 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:40:05.163 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:40:05.214 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:40:08.329 [info] beam_mcp: refused by host authorize/1: :nope -. -21:40:08.347 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:40:09.099 [info] beam_mcp: refused by host authorize/1: :nope -... -21:40:09.819 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 6.4 seconds (1.8s async, 4.6s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 308240, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.................................... -21:40:12.207 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -21:40:12.989 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -. -21:40:13.038 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:13.038 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:40:13.042 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:40:13.071 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:40:13.124 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:13.146 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:13.212 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:13.212 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:40:13.394 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:40:13.510 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:40:13.511 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:13.512 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:13.512 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:13.513 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:40:13.514 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:40:13.616 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:40:13.619 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:40:13.691 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:40:16.498 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:416 - ** (RuntimeError) The connection ended (:closed) after 0 complete response(s), and this exchange was waiting for 1. - - 0 byte(s) were read: - - "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:187: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:149: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:429: (test) - -. -21:40:17.220 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:40:17.976 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:40:17.983 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.4 seconds (2.1s async, 4.2s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 28 ---- -Running ExUnit with seed: 469151, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................................... -21:40:20.335 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:40:20.908 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -... -21:40:20.984 [info] beam_mcp: refused by host authorize/1: :nope -............ -21:40:21.138 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:40:21.189 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:40:21.195 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -21:40:21.255 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:40:21.256 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:40:21.312 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:40:21.386 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:40:21.405 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:21.431 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:21.432 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:21.444 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:40:21.566 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:40:21.567 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:21.567 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:21.567 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:21.568 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:21.568 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:40:24.300 [info] beam_mcp: refused by host authorize/1: :nope -. -21:40:24.327 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:40:24.349 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:40:24.368 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 6.1 seconds (1.9s async, 4.2s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 590244, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.............................. -21:40:28.542 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:40:29.385 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:40:29.429 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:40:29.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:40:29.621 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -21:40:29.726 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:29.727 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:29.727 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:29.728 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:40:29.729 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:40:29.750 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:29.771 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:29.772 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:29.772 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:29.773 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:40:29.777 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:40:29.891 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:29.942 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:40:29.993 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:40:30.019 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:40:33.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:40:34.088 [info] beam_mcp: refused by host authorize/1: :nope -... -21:40:34.145 [info] beam_mcp: refused by host authorize/1: :nope -. -21:40:34.155 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 6.3 seconds (2.2s async, 4.0s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 673102, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................ warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................. -21:40:36.675 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -21:40:37.346 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:40:37.399 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -.. -21:40:37.451 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:37.451 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:37.451 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:37.458 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:40:37.460 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:37.460 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:40:37.584 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:40:37.591 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:37.591 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:40:37.663 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:40:37.733 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:40:37.814 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:37.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:40:37.918 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:37.919 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:40:37.924 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:40:37.924 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -21:40:40.296 [info] beam_mcp: refused by host authorize/1: :nope -. -21:40:40.314 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:40:40.322 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -...... -21:40:41.912 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.0 seconds (2.2s async, 3.8s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 578956, max_cases: 8 - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................. -21:40:44.381 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -21:40:45.381 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:40:45.381 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:45.382 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:45.382 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:40:45.382 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -... -21:40:45.504 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:40:45.628 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:40:45.631 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:45.656 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:45.657 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:45.658 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:40:45.659 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:40:45.711 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:45.722 [info] beam_mcp: refused by host authorize/1: :nope -.............. -21:40:45.893 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:45.945 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -21:40:46.052 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:46.072 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:40:46.073 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:46.318 [info] beam_mcp: refused by host authorize/1: :nope -... -21:40:46.359 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:40:46.396 [info] beam_mcp: refused by host authorize/1: :nope -... -21:40:47.822 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -......... -Finished in 6.4 seconds (2.2s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 751409, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -..................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.................. -21:40:52.446 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -21:40:53.388 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:53.388 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -... -21:40:53.421 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:40:53.423 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:40:53.468 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:40:53.470 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:53.485 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:40:53.489 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:40:53.557 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:40:53.564 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......................... -21:40:53.884 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:40:53.884 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:40:53.954 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:53.954 [info] beam_mcp: refused by host authorize/1: :nope -............. -21:40:54.061 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:54.072 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:54.073 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:54.073 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:40:54.073 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:40:57.678 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:40:57.696 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:40:58.419 [info] beam_mcp: refused by host authorize/1: :nope -. -21:40:58.429 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 6.5 seconds (2.1s async, 4.3s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 955362, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................... -21:41:00.729 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:41:01.390 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:41:01.508 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................. -21:41:01.664 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:41:01.666 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:01.666 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:01.667 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:41:01.673 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:41:01.725 [info] beam_mcp: refused by host authorize/1: :nope -. -21:41:01.776 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:01.777 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:01.777 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:01.784 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:41:01.795 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:41:01.858 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:41:01.976 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:01.977 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:41:01.995 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:01.995 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:41:02.031 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:41:04.925 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:41:04.948 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:41:06.586 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:41:06.605 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 6.4 seconds (1.8s async, 4.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 401165, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................................... -21:41:09.407 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:41:10.253 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - - -21:41:10.311 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:41:10.426 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:41:10.426 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -21:41:10.530 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:10.531 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:10.533 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:10.621 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:10.622 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:41:10.640 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:41:10.651 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:41:10.651 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:10.661 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:41:10.729 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:41:10.731 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:10.731 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:10.732 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:41:10.835 [info] beam_mcp: refused by host authorize/1: :nope -... -21:41:10.937 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:41:14.538 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:41:15.368 [info] beam_mcp: refused by host authorize/1: :nope -. -21:41:15.376 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:41:15.404 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 6.7 seconds (2.3s async, 4.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 363775, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................... -21:41:18.404 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -21:41:19.251 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -..... -21:41:19.405 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:19.565 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:19.565 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:19.566 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:19.594 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:41:19.655 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:19.667 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:41:19.668 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:41:19.757 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:19.758 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:41:19.759 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:41:19.812 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:41:19.864 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:19.864 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:19.865 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:19.889 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:41:19.915 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:41:19.937 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:41:22.371 [info] beam_mcp: refused by host authorize/1: :nope -. -21:41:22.401 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:41:23.142 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:41:23.150 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 6.1 seconds (2.2s async, 3.9s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 560378, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -............................................... -21:41:26.485 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -..... -21:41:27.521 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:41:27.525 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:27.525 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:27.525 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:41:27.583 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:27.583 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:27.653 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:27.653 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:27.673 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:41:27.741 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:41:27.761 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:41:27.812 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:27.813 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:27.813 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:27.843 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:27.843 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -21:41:27.915 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:27.916 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:28.018 [info] beam_mcp: refused by host authorize/1: :nope -............. -21:41:30.867 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:41:30.903 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:41:31.086 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:41:31.805 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 6.0 seconds (2.3s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 537159, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -................................. -21:41:34.290 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -21:41:34.942 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:41:34.999 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -....... -21:41:35.149 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:41:35.202 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:41:35.334 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:35.334 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:41:35.371 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:41:35.372 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:41:35.375 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:35.397 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:41:35.530 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:35.531 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:35.532 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:35.532 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:41:35.584 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:35.585 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:35.585 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:35.585 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....................... -21:41:35.661 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:41:37.834 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:41:38.681 [info] beam_mcp: refused by host authorize/1: :nope -. -21:41:38.688 [info] beam_mcp: refused by host authorize/1: :nope -. -21:41:38.696 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 5.6 seconds (1.9s async, 3.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 97033, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -................ warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -....................... -21:41:41.991 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -.. -21:41:42.911 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:42.932 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:41:43.014 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:43.038 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:41:43.116 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:41:43.169 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:41:43.196 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:41:43.247 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -21:41:43.274 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:41:43.428 [info] beam_mcp: refused by host authorize/1: :nope -. -21:41:43.480 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:43.505 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:43.505 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:41:43.564 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:43.565 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:43.570 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:43.571 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:43.580 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:43.597 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:41:45.949 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:41:46.805 [info] beam_mcp: refused by host authorize/1: :nope - -21:41:46.813 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:416 - ** (RuntimeError) The connection ended (:closed) after 0 complete response(s), and this exchange was waiting for 1. - - 0 byte(s) were read: - - "" - - This is the harness failing, not the server. Nothing was measured, so nothing is reported: a verdict built on a response that was never read is exactly the false KILLED this file's own history records. - - code: {bytes, state} = exchange(port, req("POST", big) <> good_post(2), 1) - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:187: BeamMCP.Transport.HTTPBanditTest.collect/3 - test/beam_mcp/transport/http_bandit_test.exs:149: BeamMCP.Transport.HTTPBanditTest.exchange/3 - test/beam_mcp/transport/http_bandit_test.exs:429: (test) - -.. -21:41:47.531 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 6.1 seconds (2.2s async, 3.8s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 39 ---- -Running ExUnit with seed: 181371, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - - warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -.................................................. -21:41:50.116 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -... -21:41:50.814 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:50.884 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:50.884 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:41:50.902 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:50.915 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:41:50.917 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:50.917 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:50.917 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:51.019 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:51.047 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:51.048 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:41:51.048 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -21:41:51.151 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:41:51.170 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:41:51.191 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:41:51.191 [info] beam_mcp: refused by host authorize/1: :nope -. -21:41:51.242 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:41:51.259 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:41:51.259 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -21:41:54.617 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:41:55.352 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:41:55.376 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:41:55.416 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 6.7 seconds (2.0s async, 4.7s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 768297, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - - warning: undefined module attribute @write_ms, please remove access to @write_ms or explicitly set it before access - │ - 154 │ @write_ms -> :ok - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154: BeamMCP.Transport.HTTPBanditTest (module) - -..................... warning: module attribute @write_ms was set but never used - │ - 176 │ @write_ms 15_000 - │ ~~~~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:176: BeamMCP.Transport.HTTPBanditTest (module) - -...................... -21:41:58.691 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. warning: expected "after" timeout given to receive to be an integer: - - nil - - but got type: - - nil - - typing violation found at: - │ - 154 │ @write_ms -> :ok - │ ~ - │ - └─ test/beam_mcp/transport/http_bandit_test.exs:154:17: BeamMCP.Transport.HTTPBanditTest.exchange/3 - -. -21:41:59.397 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:59.397 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:59.412 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:59.413 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:59.413 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:59.414 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:41:59.434 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:59.445 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -21:41:59.609 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -21:41:59.616 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:59.641 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:41:59.641 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:41:59.641 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:59.642 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:41:59.642 [info] beam_mcp: refused by host authorize/1: :nope -..................... -21:41:59.831 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:41:59.851 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:41:59.853 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:42:00.029 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:42:03.377 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:42:03.399 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:380: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:42:04.140 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:42:04.152 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 6.1 seconds (2.0s async, 4.1s sync) -160 tests, 0 failures -RUN_EXIT=0 - -== probe-rate-mc8-load32-fixed: 6 run(s) of 40 exited non-zero == diff --git a/slices/006-harness-honesty/logs/probe-write-shape.txt b/slices/006-harness-honesty/logs/probe-write-shape.txt deleted file mode 100644 index 65cd15d8..00000000 --- a/slices/006-harness-honesty/logs/probe-write-shape.txt +++ /dev/null @@ -1,498 +0,0 @@ -background load: 32 busy loops on 32 cores -date: 2026-09-08T01:52:45Z -$ env N=120 MIX_ENV=test mix run /tmp/claude-1000/-home-aylac-Projects-beam-mcp/7e6cdf96-6bae-44c9-9851-e53830c64eb4/scratchpad/006/write_shape.exs - - -21:52:46.950 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.974 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.974 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.978 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.978 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.979 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.979 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.980 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.980 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.981 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.982 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.983 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.983 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.984 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.984 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.986 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.989 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.989 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.989 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.990 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.990 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.990 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.991 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.991 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.992 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.995 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.995 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.995 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.996 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.996 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.996 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.997 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.997 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.998 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:46.999 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.000 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.004 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.004 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.005 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.005 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.006 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.006 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.006 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.009 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.009 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.009 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.010 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.010 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.013 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.014 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.014 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.015 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.015 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.016 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.016 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.017 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.017 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.019 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.019 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.020 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.020 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.021 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.022 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.023 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.024 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.027 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.027 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.028 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.028 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.029 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.029 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.030 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.032 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.032 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.036 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.036 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.037 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.037 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.037 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.037 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.038 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.038 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.038 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.039 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.041 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.043 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.043 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.044 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.044 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.045 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.045 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.046 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.046 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.048 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.048 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.049 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.051 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.051 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.052 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.055 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.055 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.056 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.056 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.056 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.059 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.059 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.060 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.062 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.062 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.066 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.068 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.068 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.069 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.069 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.070 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.070 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.073 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.073 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.074 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.074 [info] beam_mcp: refused by host authorize/1: :nope - -== one_send: 120 runs of the 9 MB refusal, active-mode client == - {bytes delivered to the process, end reason, socket stats, authorize/1 ran?} - 120x {297, :econnreset, {:error, :einval}, true} - response MISSING in 0/120 - -21:52:47.082 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.084 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.084 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.085 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.089 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.089 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.090 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.090 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.091 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.091 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.092 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.092 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.092 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.096 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.096 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.097 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.097 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.097 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.098 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.098 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.099 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.100 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.101 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.105 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.105 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.105 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.106 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.106 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.108 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.109 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.113 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.114 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.117 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.117 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.118 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.118 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.120 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.120 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.120 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.121 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.121 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.125 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.125 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.125 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.126 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.128 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.128 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.129 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.130 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.130 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.131 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.135 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.137 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.137 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.137 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.138 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.138 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.139 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.143 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.143 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.144 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.145 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.145 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.145 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.146 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.149 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.149 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.149 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.150 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.150 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.154 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.155 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.155 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.158 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.158 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.158 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.159 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.159 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.159 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.160 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.160 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.164 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.164 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.164 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.165 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.165 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.165 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.166 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.166 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.166 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.166 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.167 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.167 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.171 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.171 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.171 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.172 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.172 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.172 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.173 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.173 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.173 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.174 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.174 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.175 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.178 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.178 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.179 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.183 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.183 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.187 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.187 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.188 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.190 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.190 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.191 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.191 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.193 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.193 [info] beam_mcp: refused by host authorize/1: :nope - -21:52:47.193 [info] beam_mcp: refused by host authorize/1: :nope - -== chunked: 120 runs of the 9 MB refusal, active-mode client == - {bytes delivered to the process, end reason, socket stats, authorize/1 ran?} - 115x {297, :econnreset, {:error, :einval}, true} - 5x {0, :econnreset, {:error, :einval}, true} - response MISSING in 5/120 - -PROBE_DONE -EXIT=0 diff --git a/slices/006-harness-honesty/logs/red-gate-credo-nesting.txt b/slices/006-harness-honesty/logs/red-gate-credo-nesting.txt deleted file mode 100644 index e76090b9..00000000 --- a/slices/006-harness-honesty/logs/red-gate-credo-nesting.txt +++ /dev/null @@ -1,129 +0,0 @@ -== the gate, run 5 times on the tree that ships == -date: 2026-09-08T02:35:41Z -dirty: 5 path(s) (the slice's own uncommitted work) - ----- gate run 1 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo FAIL (exit 8) - Checking 16 source files ... - - Refactoring opportunities - ┃ - ┃ [F] → Function body is nested too deep (max depth is 2, was 3). - ┃ test/beam_mcp/transport/http_bandit_test.exs:351:30 #(BeamMCP.Transport.HTTPBanditTest.fake_listener) - - Please report incorrect results: https://github.com/rrrene/credo/issues - - Analysis took 0.1 seconds (0.02s to load, 0.1s running 69 checks on 16 files) - 252 mods/funs, found 1 refactoring opportunity. - - Use `mix credo explain` to explain issues, `mix credo --help` for options. - optional deps pass - docs pass - reuse pass (234 tracked; 59 in scope, 57 headered + 2 sidecar; excluded 173 archive + 2 licence text) - licence files pass -GATE FAILED. -GATE_EXIT=1 ----- gate run 2 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo FAIL (exit 8) - Checking 16 source files ... - - Refactoring opportunities - ┃ - ┃ [F] → Function body is nested too deep (max depth is 2, was 3). - ┃ test/beam_mcp/transport/http_bandit_test.exs:351:30 #(BeamMCP.Transport.HTTPBanditTest.fake_listener) - - Please report incorrect results: https://github.com/rrrene/credo/issues - - Analysis took 0.1 seconds (0.02s to load, 0.1s running 69 checks on 16 files) - 252 mods/funs, found 1 refactoring opportunity. - - Use `mix credo explain` to explain issues, `mix credo --help` for options. - optional deps pass - docs pass - reuse pass (234 tracked; 59 in scope, 57 headered + 2 sidecar; excluded 173 archive + 2 licence text) - licence files pass -GATE FAILED. -GATE_EXIT=1 ----- gate run 3 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo FAIL (exit 8) - Checking 16 source files ... - - Refactoring opportunities - ┃ - ┃ [F] → Function body is nested too deep (max depth is 2, was 3). - ┃ test/beam_mcp/transport/http_bandit_test.exs:351:30 #(BeamMCP.Transport.HTTPBanditTest.fake_listener) - - Please report incorrect results: https://github.com/rrrene/credo/issues - - Analysis took 0.1 seconds (0.02s to load, 0.1s running 69 checks on 16 files) - 252 mods/funs, found 1 refactoring opportunity. - - Use `mix credo explain` to explain issues, `mix credo --help` for options. - optional deps pass - docs pass - reuse pass (234 tracked; 59 in scope, 57 headered + 2 sidecar; excluded 173 archive + 2 licence text) - licence files pass -GATE FAILED. -GATE_EXIT=1 ----- gate run 4 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo FAIL (exit 8) - Checking 16 source files ... - - Refactoring opportunities - ┃ - ┃ [F] → Function body is nested too deep (max depth is 2, was 3). - ┃ test/beam_mcp/transport/http_bandit_test.exs:351:30 #(BeamMCP.Transport.HTTPBanditTest.fake_listener) - - Please report incorrect results: https://github.com/rrrene/credo/issues - - Analysis took 0.1 seconds (0.02s to load, 0.1s running 69 checks on 16 files) - 252 mods/funs, found 1 refactoring opportunity. - - Use `mix credo explain` to explain issues, `mix credo --help` for options. - optional deps pass - docs pass - reuse pass (234 tracked; 59 in scope, 57 headered + 2 sidecar; excluded 173 archive + 2 licence text) - licence files pass -GATE FAILED. -GATE_EXIT=1 ----- gate run 5 ---- -== beam_mcp gate == - format pass - compile pass - test pass - credo FAIL (exit 8) - Checking 16 source files ... - - Refactoring opportunities - ┃ - ┃ [F] → Function body is nested too deep (max depth is 2, was 3). - ┃ test/beam_mcp/transport/http_bandit_test.exs:351:30 #(BeamMCP.Transport.HTTPBanditTest.fake_listener) - - Please report incorrect results: https://github.com/rrrene/credo/issues - - Analysis took 0.1 seconds (0.02s to load, 0.1s running 69 checks on 16 files) - 252 mods/funs, found 1 refactoring opportunity. - - Use `mix credo explain` to explain issues, `mix credo --help` for options. - optional deps pass - docs pass - reuse pass (234 tracked; 59 in scope, 57 headered + 2 sidecar; excluded 173 archive + 2 licence text) - licence files pass -GATE FAILED. -GATE_EXIT=1 diff --git a/slices/006-harness-honesty/logs/red-mutation-under-load.txt b/slices/006-harness-honesty/logs/red-mutation-under-load.txt deleted file mode 100644 index 7de31334..00000000 --- a/slices/006-harness-honesty/logs/red-mutation-under-load.txt +++ /dev/null @@ -1,18 +0,0 @@ -background load: 32 busy loops on 32 cores -date: 2026-09-08T01:25:07Z -$ ./tools/mutate.sh score - -target: lib/beam_mcp/transport/http.ex -passes: 4 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=3 -M13rev | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 2 failures TEST_EXIT=2 | 160 tests, 2 failures TEST_EXIT=2 | 160 tests, 2 failures TEST_EXIT=2 -M2always | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 2 failures TEST_EXIT=2 | 160 tests, 2 failures TEST_EXIT=2 | 160 tests, 1 failure TEST_EXIT=2 -M2never | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 0 failures TEST_EXIT=0 -Mc2 | 160 tests, 0 failures TEST_EXIT=0 | 160 tests, 0 failures TEST_EXIT=0 | 160 tests, 0 failures TEST_EXIT=0 | 160 tests, 0 failures TEST_EXIT=0 -Mc3 | 160 tests, 2 failures TEST_EXIT=2 | 160 tests, 2 failures TEST_EXIT=2 | 160 tests, 3 failures TEST_EXIT=2 | 160 tests, 3 failures TEST_EXIT=2 -Md1 | 160 tests, 9 failures TEST_EXIT=2 | 160 tests, 9 failures TEST_EXIT=2 | 160 tests, 9 failures TEST_EXIT=2 | 160 tests, 9 failures TEST_EXIT=2 -Md2 | 160 tests, 2 failures TEST_EXIT=2 | 160 tests, 3 failures TEST_EXIT=2 | 160 tests, 3 failures TEST_EXIT=2 | 160 tests, 3 failures TEST_EXIT=2 -Me1 | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 1 failure TEST_EXIT=2 | 160 tests, 1 failure TEST_EXIT=2 -Mr1 | 160 tests, 4 failures TEST_EXIT=2 | 160 tests, 4 failures TEST_EXIT=2 | 160 tests, 5 failures TEST_EXIT=2 | 160 tests, 5 failures TEST_EXIT=2 -Mr2 | 160 tests, 3 failures TEST_EXIT=2 | 160 tests, 4 failures TEST_EXIT=2 | 160 tests, 3 failures TEST_EXIT=2 | 160 tests, 3 failures TEST_EXIT=2 -EXIT=0 diff --git a/slices/006-harness-honesty/logs/red-rate-mc64-idle.txt b/slices/006-harness-honesty/logs/red-rate-mc64-idle.txt deleted file mode 100644 index 50f1f02d..00000000 --- a/slices/006-harness-honesty/logs/red-rate-mc64-idle.txt +++ /dev/null @@ -1,25128 +0,0 @@ -== red-rate-mc64-idle == -command: mix test --max-cases 64 (x100 consecutive runs) -background load: 0 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=4 -date: 2026-09-08T02:03:42Z - ----- run 1 ---- -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 467003, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:03:43.610 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:03:43.831 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:03:43.832 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:03:43.833 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:03:43.999 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:03:44.000 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:03:44.001 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:44.006 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:03:44.006 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:44.006 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:44.006 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:03:44.059 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:44.059 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:03:44.060 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:03:44.171 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:44.171 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:03:44.224 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:44.224 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......................... -22:03:44.395 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:44.395 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:03:45.398 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:03:46.832 [info] beam_mcp: refused by host authorize/1: :nope -. -22:03:46.837 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:03:46.923 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 339233, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:03:47.483 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:03:47.713 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:47.820 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:03:47.826 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:03:47.828 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:03:47.832 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:03:47.839 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:03:47.944 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:47.944 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:47.944 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:47.997 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:03:48.101 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:03:48.107 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:48.108 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:03:48.162 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:03:48.162 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:03:48.162 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:03:48.214 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:48.214 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:03:48.219 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:03:49.227 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:03:49.955 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:03:49.958 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:03:50.742 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 163983, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:03:51.321 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:03:51.534 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:03:51.594 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:03:51.594 [info] beam_mcp: refused by host authorize/1: :nope -... -22:03:51.697 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:03:51.700 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:03:51.811 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:03:51.815 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:03:51.818 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:51.818 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:51.819 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:03:51.923 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:51.927 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:51.928 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:51.928 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:51.928 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:03:51.936 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:51.987 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:03:52.091 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:52.096 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:03:54.448 [info] beam_mcp: refused by host authorize/1: :nope -. -22:03:54.454 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:03:54.458 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:03:54.537 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 1278, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:03:55.186 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:03:55.387 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:03:55.401 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:55.401 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:03:55.511 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:55.511 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:03:55.517 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:03:55.518 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:03:55.523 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:03:55.527 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:03:55.580 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:55.580 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:55.580 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:55.580 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:03:55.640 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:03:55.693 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:03:55.799 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:03:55.858 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:03:55.910 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:03:55.910 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:03:56.918 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:03:57.648 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:03:58.435 [info] beam_mcp: refused by host authorize/1: :nope -. -22:03:58.440 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 891610, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:03:59.068 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:03:59.327 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:59.332 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:59.332 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:59.332 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:03:59.333 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:03:59.333 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:03:59.337 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:03:59.445 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:03:59.449 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:59.507 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:03:59.513 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:03:59.516 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:03:59.568 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:03:59.621 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:03:59.622 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:59.623 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:03:59.675 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:03:59.683 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:03:59.789 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:04:01.610 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:01.615 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:04:01.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:04:02.330 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 789150, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:04:02.997 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:04:03.205 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:04:03.208 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:04:03.262 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:03.262 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:03.262 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:04:03.270 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:03.322 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:03.323 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:04:03.428 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:03.429 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:03.431 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:04:03.432 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:03.436 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:03.437 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:03.438 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:03.497 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:03.503 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:04:03.608 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:04:03.717 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:04:05.428 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:04:05.483 [info] beam_mcp: refused by host authorize/1: :nope -... -22:04:06.208 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:04:06.212 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 673409, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:04:06.808 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:04:07.158 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:04:07.159 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:04:07.279 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:07.284 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:04:07.337 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:07.340 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:07.341 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:07.341 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:04:07.398 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:07.398 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:07.455 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:04:07.459 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:04:07.512 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:07.564 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:07.565 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:07.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:04:07.618 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:07.619 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:07.619 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:04:09.314 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:04:09.370 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:09.374 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:04:10.104 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 540645, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:04:10.708 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................................... -22:04:11.057 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:11.057 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:11.058 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:11.117 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:11.118 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:04:11.276 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:11.279 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:04:11.332 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:04:11.339 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:11.339 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:04:11.350 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:11.351 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:04:11.352 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:04:11.404 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:04:11.460 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:11.461 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:04:11.461 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:11.462 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:11.462 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:04:13.169 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:13.236 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:13.948 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:04:13.956 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 400770, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:04:14.545 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:04:14.774 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:14.832 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:04:14.885 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:14.936 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:04:15.042 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:04:15.044 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:04:15.044 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:15.045 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:04:15.053 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:15.053 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:15.105 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:15.105 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:15.105 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:15.114 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:04:15.172 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:15.224 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:15.278 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:15.278 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:15.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:04:16.286 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:16.294 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:04:17.067 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:17.074 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 244738, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:04:18.410 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:04:18.609 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:18.616 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:18.616 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:18.623 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:04:18.682 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:18.686 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:18.686 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:18.686 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:18.790 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:04:18.848 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:04:18.908 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:04:19.013 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:19.014 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:19.065 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:04:19.123 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:04:19.125 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:04:19.183 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:19.183 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:19.183 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:04:20.912 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:21.624 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:04:21.639 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:21.643 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 85749, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:04:22.299 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:04:22.457 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:04:22.667 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:22.677 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:22.730 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:04:22.735 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:04:22.844 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:22.896 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:04:22.896 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:04:22.902 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:22.903 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:22.903 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:22.903 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:22.903 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:04:22.905 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:22.957 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:04:22.966 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:22.966 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:22.966 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:22.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:04:24.004 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:24.062 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:24.777 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:04:25.502 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 946025, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:04:26.152 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:04:26.399 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:26.399 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:04:26.462 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:04:26.517 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:26.517 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:04:26.518 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:26.518 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:26.518 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:26.519 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:04:26.623 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:26.624 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:26.675 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:26.728 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:26.784 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:04:26.836 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:26.839 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:04:26.897 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:26.899 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:26.902 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -22:04:27.893 [info] beam_mcp: refused by host authorize/1: :nope -... -22:04:28.608 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:04:28.612 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:04:28.617 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 804715, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:04:30.020 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:04:30.233 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:30.234 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:30.234 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:30.238 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:30.240 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:04:30.293 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:30.294 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:30.294 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:30.348 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:30.400 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:04:30.458 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:04:30.518 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:30.521 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:30.526 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:04:30.528 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:30.580 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:04:30.586 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:30.587 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:30.638 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:04:32.511 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:32.526 [info] beam_mcp: refused by host authorize/1: :nope -... -22:04:33.241 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:04:33.245 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 680479, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:04:33.893 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:04:34.071 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:34.072 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:34.127 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:04:34.129 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:34.130 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:34.130 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:04:34.240 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:34.240 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:04:34.240 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:34.296 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:34.354 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:04:34.355 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:34.409 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:34.409 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:34.409 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:34.410 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:04:34.523 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:04:34.576 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:34.576 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........................ -22:04:35.685 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:35.691 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:04:36.402 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:36.415 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 588937, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:04:37.752 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:04:37.956 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:37.957 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:37.957 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:04:38.009 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:38.012 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:04:38.179 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:38.179 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:38.180 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:38.180 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:38.237 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:38.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:04:38.294 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:04:38.397 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:38.448 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:04:38.502 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:04:38.510 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:38.511 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:04:38.516 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:04:38.520 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:04:39.510 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:04:39.567 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:39.574 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:40.282 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 456893, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:04:41.665 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:04:41.841 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:41.892 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:04:41.951 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:41.952 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:41.952 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:41.952 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:04:42.010 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:04:42.012 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:42.012 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:42.012 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:04:42.069 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:42.071 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:42.075 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:04:42.135 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:42.135 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:42.240 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:04:42.350 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:42.350 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:04:42.410 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:04:43.400 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:04:44.114 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:04:44.117 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:44.902 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 355383, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:04:45.496 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:04:45.739 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:45.740 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:04:45.848 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:45.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:04:45.963 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:04:46.073 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:46.073 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:46.075 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:46.076 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -22:04:46.141 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:04:46.142 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:46.142 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:04:46.247 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:46.248 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:46.248 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:46.248 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:46.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:04:46.249 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:46.307 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:04:48.808 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:48.814 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:04:48.822 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:04:48.826 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 264679, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:04:49.443 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:04:49.648 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:49.705 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:49.757 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:49.758 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:49.759 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:04:49.866 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:49.922 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:04:49.924 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:04:49.983 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:04:49.984 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:49.989 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:50.049 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:50.052 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:50.052 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:50.052 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:04:50.105 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:04:50.161 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:50.161 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:50.214 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:04:51.273 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:51.279 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -22:04:52.701 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:04:52.718 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 130196, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:04:53.271 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:04:53.528 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:04:53.532 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:53.542 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:53.542 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:04:53.594 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:53.652 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:53.652 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:53.704 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:53.704 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:53.704 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:04:53.761 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:04:53.819 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:53.872 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:04:53.929 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:53.929 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:53.930 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:04:53.930 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:53.985 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:04:54.039 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:04:55.108 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:56.603 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:56.608 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:04:56.611 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 34333, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:04:57.247 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:04:57.431 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:57.484 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:04:57.588 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:57.589 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:57.695 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:04:57.749 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:57.749 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:57.749 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:04:57.760 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:04:57.762 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:04:57.762 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:04:57.766 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:04:57.819 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:04:57.820 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:04:57.825 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:04:57.826 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:04:57.826 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:04:57.937 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:04:57.937 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:04:58.932 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:58.938 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:04:59.700 [info] beam_mcp: refused by host authorize/1: :nope -. -22:04:59.703 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 845140, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:05:00.993 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:05:01.249 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:01.303 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:01.306 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:01.309 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:01.361 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:05:01.466 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:05:01.467 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:01.467 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:01.467 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:05:01.468 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:01.474 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:01.474 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:05:01.528 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:05:01.534 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:01.535 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:05:01.697 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:05:01.750 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:05:01.751 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:01.751 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:05:02.799 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:05:02.857 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:03.568 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:05:03.583 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 739723, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:05:04.905 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:05:05.101 [info] beam_mcp: refused by host authorize/1: :nope -... -22:05:05.160 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:05.213 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:05.268 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:05.268 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:05.269 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:05.269 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:05.275 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:05:05.386 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:05:05.442 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:05.443 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:05.497 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:05:05.498 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:05.498 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:05.498 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:05.498 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:05:05.556 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:05:05.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:05:05.662 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:06.626 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:06.632 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:05:06.645 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:05:07.411 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 593897, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:05:08.809 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:05:09.012 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:09.072 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:09.077 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:05:09.077 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:05:09.135 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:09.136 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:09.136 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:09.136 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:09.136 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:05:09.137 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...................... -22:05:09.256 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:09.309 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:09.310 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:09.310 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:09.312 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:09.312 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:05:09.473 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:09.474 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:09.474 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:05:10.532 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:05:11.295 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:11.302 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:05:11.305 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 445621, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:05:12.619 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -22:05:12.869 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:05:12.870 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:12.986 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:13.042 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:13.042 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:05:13.145 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:13.145 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:13.145 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:13.204 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:13.205 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:13.206 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:13.206 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:13.206 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:13.207 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:13.313 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:05:13.313 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:05:13.318 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:05:13.325 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:05:13.382 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:05:15.102 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:15.157 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:15.869 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:05:15.879 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 324731, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:05:16.462 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................. -22:05:16.810 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:16.866 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:05:16.867 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:16.867 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:16.867 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:16.867 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:16.869 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:05:16.922 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:16.922 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:16.931 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:16.934 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:16.937 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:16.938 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:05:16.939 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:16.939 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:16.939 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........................ -22:05:17.096 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:17.102 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:17.155 [info] beam_mcp: refused by host authorize/1: :nope -........................... -22:05:18.980 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:05:19.704 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:19.708 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:05:19.788 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 218746, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:05:20.376 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................... -22:05:20.654 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:20.655 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:20.658 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:20.659 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:05:20.665 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:05:20.718 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:05:20.773 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:20.773 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:20.877 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:20.877 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:20.878 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:20.986 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:21.097 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:21.151 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:05:21.152 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:21.152 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:21.152 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:21.152 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:05:21.153 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:05:23.559 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:05:23.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:05:23.644 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:23.649 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 82511, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:05:24.256 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:05:24.677 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:24.678 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:24.679 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:24.679 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:24.679 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:24.743 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:05:24.744 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:24.744 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:05:24.805 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:24.806 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:24.860 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:24.861 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:05:24.912 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:24.916 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:24.916 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:05:24.916 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:05:24.922 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:05:24.975 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:24.977 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:05:26.018 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -22:05:27.531 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:27.535 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:05:27.543 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 28 ---- -Running ExUnit with seed: 966815, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:05:28.164 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:05:28.407 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:05:28.413 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:28.417 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:28.417 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:05:28.469 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:05:28.575 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:05:28.630 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:28.630 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:28.630 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:28.631 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:28.631 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:28.631 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:28.633 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:05:28.633 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:05:28.750 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:28.854 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:05:28.857 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:28.861 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:28.862 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:05:29.931 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:05:31.445 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:31.450 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:05:31.454 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 874099, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:05:32.033 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:05:32.401 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:32.401 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:32.453 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:05:32.512 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:05:32.570 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:32.573 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:05:32.627 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:32.628 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:32.628 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:32.684 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:05:32.744 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:32.745 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:32.745 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:05:32.745 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:32.745 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:32.804 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:32.805 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:05:32.809 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:05:32.810 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:05:33.818 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:05:33.825 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:05:34.598 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:34.605 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 759378, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:05:35.913 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:05:36.241 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:36.241 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......................... -22:05:36.297 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:36.300 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:36.304 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:36.305 [info] beam_mcp: refused by host authorize/1: :nope -... -22:05:36.357 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:36.357 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:36.363 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:36.423 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:36.424 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:05:36.425 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:05:36.478 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:36.531 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:36.532 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:36.586 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:05:36.592 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:36.593 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:36.593 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:05:38.434 [info] beam_mcp: refused by host authorize/1: :nope -... -22:05:39.148 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:39.152 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:05:39.170 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 621236, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:05:39.809 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:05:40.067 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:05:40.070 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:40.072 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:05:40.124 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:40.177 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:40.177 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:40.232 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:40.289 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:40.291 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:40.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:05:40.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:05:40.294 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:40.294 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:05:40.409 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:40.515 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:40.516 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:40.516 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:05:40.577 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:40.577 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:05:42.994 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:05:43.001 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:43.079 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:43.085 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 514893, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:05:43.654 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:05:43.884 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:43.995 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:44.048 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:05:44.153 [info] beam_mcp: refused by host authorize/1: :nope -........................ -22:05:44.211 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:44.216 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:44.218 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:05:44.224 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:44.280 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:44.281 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:05:44.281 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:05:44.384 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:44.385 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:44.385 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:44.437 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:44.437 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:44.438 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:44.438 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:44.443 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:05:45.408 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:05:46.925 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:46.931 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:05:46.934 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 366567, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:05:47.547 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:05:47.715 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:47.720 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:47.721 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:47.721 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:47.730 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:47.733 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:05:47.740 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:47.741 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:47.749 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:05:47.908 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:05:47.965 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:05:47.966 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:47.966 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:48.074 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:05:48.128 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:48.135 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:48.187 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:48.238 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:05:48.240 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:49.326 [info] beam_mcp: refused by host authorize/1: :nope -... -22:05:50.040 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:05:50.045 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:05:50.754 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 219767, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:05:51.389 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -22:05:51.603 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:05:51.659 [info] beam_mcp: refused by host authorize/1: :nope -............... -22:05:51.715 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:05:51.715 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:51.723 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:05:51.879 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:51.933 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:51.936 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:05:51.945 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:52.004 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:52.006 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:52.006 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:52.006 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:52.007 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:52.007 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:52.007 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:52.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:05:52.065 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:52.117 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:05:53.151 [info] beam_mcp: refused by host authorize/1: :nope -. -22:05:53.156 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:05:53.214 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:05:53.924 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 128162, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:05:55.342 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:05:55.486 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:05:55.648 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:05:55.648 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:55.653 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:55.653 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:05:55.713 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:05:55.723 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:55.727 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:55.730 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:55.732 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:05:55.732 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:05:55.733 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:55.733 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:55.733 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:55.733 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:55.734 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:55.734 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:55.734 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.............. -22:05:55.888 [info] beam_mcp: refused by host authorize/1: :nope -.................... -22:05:57.746 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:05:57.748 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:05:57.804 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:05:58.523 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 980468, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:05:59.187 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:05:59.350 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:05:59.369 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:59.370 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:59.370 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:05:59.431 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:05:59.431 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:59.437 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:59.437 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:05:59.493 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:05:59.547 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:05:59.602 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:05:59.659 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:05:59.662 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:05:59.664 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:05:59.774 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:05:59.929 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:05:59.930 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:59.930 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:05:59.930 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:06:00.886 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:00.891 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:06:00.893 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:06:00.950 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 826384, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:06:03.003 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:06:03.194 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:03.194 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:03.202 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:06:03.268 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......................... -22:06:03.375 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:03.427 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:06:03.486 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:03.487 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:03.593 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:03.598 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:03.599 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:03.651 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:06:03.653 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:03.653 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:03.653 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:06:03.764 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:03.765 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:03.765 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:03.765 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:06:04.718 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:06:04.776 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:06:05.504 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:06.214 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 693933, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:06:06.909 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:06:07.068 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:07.124 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:06:07.176 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:07.179 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:06:07.180 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:07.194 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:07.198 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:07.251 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:07.251 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:06:07.358 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:07.360 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:06:07.364 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:07.365 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:06:07.470 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:07.471 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:07.471 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:07.473 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:06:07.525 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:06:07.579 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:06:08.583 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:06:09.299 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:06:10.083 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:10.087 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 523271, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:06:10.704 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:06:10.882 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:06:10.900 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:06:10.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:06:11.072 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:06:11.228 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:11.281 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:11.282 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:11.334 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:11.334 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:11.335 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:06:11.338 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:11.339 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:11.340 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:11.340 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:11.349 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:11.352 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:11.405 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:11.406 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:06:11.407 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:06:12.472 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:06:12.475 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:06:12.532 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:12.535 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 427945, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:06:14.636 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:06:14.796 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:14.862 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:06:14.922 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:14.976 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:06:14.977 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:14.978 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:06:15.084 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:15.088 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:15.140 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:15.194 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:15.195 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:15.195 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:15.195 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:15.195 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:15.249 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:15.249 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:15.256 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:06:15.256 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -22:06:15.313 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:06:17.073 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:17.077 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:06:17.090 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:06:17.803 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 41 ---- -Running ExUnit with seed: 264971, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:06:18.477 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -22:06:18.701 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:06:18.703 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:18.708 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:18.708 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:18.761 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:18.762 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:18.762 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:18.768 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:06:18.824 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:18.824 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:18.824 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:06:18.930 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:18.930 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:18.930 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:06:18.931 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:19.036 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:06:19.088 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:06:19.198 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:06:19.205 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:20.187 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:20.196 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:06:21.695 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:21.704 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 42 ---- -Running ExUnit with seed: 146146, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -22:06:22.293 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................. -22:06:22.529 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:06:22.584 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:06:22.636 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:22.637 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:22.642 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:22.643 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:22.643 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:06:22.699 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:06:22.810 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:22.915 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:22.915 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:22.915 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:22.968 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:22.975 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:22.977 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:06:23.088 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:23.089 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:06:23.089 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:06:23.089 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:24.754 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:06:25.481 [info] beam_mcp: refused by host authorize/1: :nope -... -22:06:25.493 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:06:25.570 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 43 ---- -Running ExUnit with seed: 980393, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:06:26.190 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:06:26.415 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:26.420 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:26.421 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:06:26.423 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:26.427 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:26.427 [info] beam_mcp: refused by host authorize/1: :nope -... -22:06:26.480 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:06:26.590 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:06:26.643 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:26.644 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:26.644 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:26.703 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:26.755 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:06:26.807 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:06:26.859 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -22:06:26.860 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:26.860 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:26.861 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:26.861 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:06:27.925 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:06:27.928 [info] beam_mcp: refused by host authorize/1: :nope -... -22:06:28.693 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:28.697 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 44 ---- -Running ExUnit with seed: 858405, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:06:30.028 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:06:30.280 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:06:30.386 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:06:30.386 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:06:30.448 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:30.452 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:30.452 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:30.456 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:06:30.559 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:30.618 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:30.619 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:30.619 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:30.624 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:30.625 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:06:30.627 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:30.628 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:30.680 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:30.680 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:30.680 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:06:30.785 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:06:31.734 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:06:31.739 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:31.742 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:06:32.515 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 45 ---- -Running ExUnit with seed: 662156, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:06:33.831 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:06:34.089 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:34.089 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:06:34.212 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:06:34.322 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:06:34.323 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:34.374 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:06:34.426 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:34.427 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:34.429 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:06:34.429 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:06:34.429 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:06:34.433 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:34.434 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:34.434 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:34.434 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:34.543 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:06:34.597 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:06:34.650 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:34.651 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:35.600 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:06:36.365 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:06:37.092 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:37.096 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 46 ---- -Running ExUnit with seed: 536699, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:06:37.709 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:06:37.907 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:37.907 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:37.907 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:37.921 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:37.929 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:37.929 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:06:38.097 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:06:38.098 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:06:38.257 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:38.257 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:38.258 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:38.258 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:38.263 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:38.316 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:38.371 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:38.375 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:06:38.427 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:06:38.427 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:06:38.434 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:06:40.190 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:06:40.980 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:300 - Expected truthy, got false - code: assert String.contains?(bytes, "HTTP/1.1 403") - arguments: - - # 1 - "" - - # 2 - "HTTP/1.1 403" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:315: (test) - -. -22:06:40.999 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:06:41.006 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 47 ---- -Running ExUnit with seed: 432118, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:06:41.594 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:06:41.807 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:41.808 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:41.859 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:41.863 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:06:41.974 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:06:42.027 [info] beam_mcp: refused by host authorize/1: :nope -... -22:06:42.089 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:42.089 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:42.093 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:42.148 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:06:42.202 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:06:42.254 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:42.255 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:42.255 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:42.261 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:42.268 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:42.268 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:42.268 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:06:42.372 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -................ -22:06:43.318 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:06:43.323 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:06:44.745 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:06:44.822 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 48 ---- -Running ExUnit with seed: 265707, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:06:45.433 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:06:45.683 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:45.683 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:45.683 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:06:45.690 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:06:45.755 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:06:45.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:06:46.024 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:46.024 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:46.025 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:46.029 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:46.030 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:46.030 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:06:46.084 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:06:46.084 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:46.136 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:46.137 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:46.189 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:06:46.194 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:46.194 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:06:47.167 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:06:47.169 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:06:47.224 [info] beam_mcp: refused by host authorize/1: :nope -... -22:06:48.641 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 49 ---- -Running ExUnit with seed: 103379, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:06:49.317 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:06:49.498 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:06:49.556 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:49.556 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:06:49.610 [info] beam_mcp: refused by host authorize/1: :nope -... -22:06:49.718 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:49.719 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:49.719 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:49.719 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:49.721 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:06:49.721 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:49.721 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:49.722 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:06:49.778 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:06:49.783 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:49.787 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:49.840 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:06:49.840 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -22:06:50.011 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:50.012 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:06:51.061 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:51.064 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:06:51.071 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:06:51.788 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 50 ---- -Running ExUnit with seed: 860647, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:06:53.044 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:06:53.226 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:53.226 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:06:53.279 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................................. -22:06:53.549 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:06:53.615 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:06:53.616 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:53.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:06:53.674 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:53.675 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:53.675 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:53.675 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:53.679 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:53.682 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:53.735 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:06:53.736 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:53.737 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:53.737 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:53.737 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:06:53.738 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:06:54.858 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:54.862 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:06:55.570 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:06:56.279 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 51 ---- -Running ExUnit with seed: 756902, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:06:56.965 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:06:57.198 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:57.201 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:06:57.201 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:57.202 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:06:57.254 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:57.259 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:06:57.261 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:06:57.371 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:06:57.431 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:06:57.489 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:06:57.542 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:57.542 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:57.543 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:57.543 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:06:57.545 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:06:57.608 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:06:57.662 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:06:57.662 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:06:57.662 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -22:06:58.718 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:58.773 [info] beam_mcp: refused by host authorize/1: :nope -. -22:06:58.777 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -22:07:00.199 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 52 ---- -Running ExUnit with seed: 629147, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:07:00.767 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:07:00.990 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:01.014 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:01.022 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:01.022 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:01.027 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:01.027 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:01.079 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:01.079 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:01.080 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:07:01.132 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:07:01.184 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:01.238 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:01.238 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:01.241 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:07:01.351 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:07:01.403 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:07:01.403 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:07:01.463 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:01.464 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:07:02.564 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:02.570 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:07:03.291 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:07:04.075 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 53 ---- -Running ExUnit with seed: 503773, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:07:04.679 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -22:07:04.896 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} - -22:07:04.897 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:04.909 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:04.909 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:04.919 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:04.919 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:04.919 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:07:05.083 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:05.136 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:07:05.149 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:05.202 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:07:05.202 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -22:07:05.358 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:07:05.417 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:05.470 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:05.470 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:05.470 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:05.470 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:05.474 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:07:07.133 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:07:07.920 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:07.939 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:07:07.943 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 54 ---- -Running ExUnit with seed: 366472, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -22:07:08.577 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:07:08.729 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:08.740 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:08.740 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:08.740 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:08.741 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:08.741 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:08.797 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:08.801 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:07:08.802 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:07:08.802 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -22:07:08.913 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:08.917 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:08.929 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:08.985 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:08.987 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:09.038 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:09.091 [info] beam_mcp: refused by host authorize/1: :nope -................. -22:07:09.253 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:09.253 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -22:07:10.277 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:10.335 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:10.348 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:10.353 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 55 ---- -Running ExUnit with seed: 220312, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -22:07:12.428 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:07:12.598 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:07:12.657 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:07:12.657 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:07:12.709 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:12.709 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:12.710 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:12.710 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........................... -22:07:12.926 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:12.933 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:07:12.933 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:12.934 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:12.934 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:12.934 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:12.934 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:12.987 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:13.047 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:13.047 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:13.047 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:07:13.155 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:07:15.527 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:15.532 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:15.536 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:07:15.615 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 56 ---- -Running ExUnit with seed: 54563, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:07:16.251 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:07:16.434 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:16.434 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:16.447 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:07:16.555 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:16.556 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:07:16.613 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:16.614 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:07:16.666 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:07:16.721 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:07:16.880 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:07:16.883 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:16.890 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:16.949 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:16.949 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:16.950 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:16.950 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:16.950 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:07:16.951 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:17.016 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:07:17.971 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:07:18.684 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:07:19.392 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:19.470 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 57 ---- -Running ExUnit with seed: 897194, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -22:07:20.089 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:07:20.259 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:07:20.260 [info] beam_mcp: refused by host authorize/1: :nope -... -22:07:20.368 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:20.370 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:20.371 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:07:20.435 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:20.488 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:20.489 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:07:20.646 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:20.646 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:20.646 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:20.648 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:07:20.654 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:20.657 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:20.709 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:07:20.716 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:07:20.717 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:20.717 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:20.717 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -22:07:21.810 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:21.870 [info] beam_mcp: refused by host authorize/1: :nope -... -22:07:22.591 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:22.594 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 58 ---- -Running ExUnit with seed: 781610, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:07:23.925 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................... -22:07:24.215 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:24.267 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:24.268 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:24.320 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:24.320 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:07:24.384 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:24.385 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:24.440 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:07:24.440 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:07:24.598 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:07:24.702 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:24.707 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:07:24.708 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:24.712 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:24.712 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:07:24.712 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:07:24.712 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:24.713 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:24.713 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:07:26.405 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:07:26.464 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:26.478 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:07:27.191 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 59 ---- -Running ExUnit with seed: 633494, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:07:27.790 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:07:28.001 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:07:28.113 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:07:28.114 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:28.115 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:28.115 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:28.174 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:07:28.175 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:07:28.176 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:28.236 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:28.240 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:28.240 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:28.291 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:28.343 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:28.401 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:28.401 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:28.401 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -22:07:28.402 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:28.507 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:07:28.561 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:07:29.524 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:07:30.239 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:30.294 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:07:31.018 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 60 ---- -Running ExUnit with seed: 460006, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:07:31.668 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -22:07:31.835 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:31.836 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:31.840 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:07:31.861 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:07:31.916 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:31.916 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:31.923 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:31.978 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:07:32.086 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:32.094 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:32.095 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:32.096 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:07:32.201 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:32.201 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:07:32.364 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:07:32.365 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:32.365 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:32.366 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:32.374 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:07:33.366 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:33.368 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:07:33.383 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:34.144 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 61 ---- -Running ExUnit with seed: 307114, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:07:35.503 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:07:35.689 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:35.700 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:07:35.704 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:35.756 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:07:35.764 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:07:35.769 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:07:35.772 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:35.827 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:07:35.981 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:35.981 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:07:36.039 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:36.091 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:36.092 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:36.092 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:36.092 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:07:36.153 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:36.153 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:07:36.264 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:36.266 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:07:37.249 [info] beam_mcp: refused by host authorize/1: :nope -... -22:07:37.266 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:37.269 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:07:38.687 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 62 ---- -Running ExUnit with seed: 153856, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:07:39.364 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -22:07:39.532 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:39.589 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:39.590 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:39.590 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:07:39.699 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:39.699 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:39.702 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:39.702 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:39.702 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:07:39.762 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:07:39.826 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:39.883 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:39.884 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:39.884 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:07:39.939 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:07:39.940 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:07:39.940 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:07:39.993 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:40.099 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -22:07:41.157 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:07:42.591 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:42.595 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:07:42.599 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 63 ---- -Running ExUnit with seed: 91828, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:07:43.255 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:07:43.465 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:07:43.521 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:07:43.522 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:07:43.637 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:43.639 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:43.639 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:07:43.741 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:43.741 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:43.794 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:07:43.847 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:43.907 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:43.907 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:07:43.908 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:43.908 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:43.908 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:43.908 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:07:44.013 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:44.020 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:44.023 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:07:45.779 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:45.786 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:07:45.798 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:45.801 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 64 ---- -Running ExUnit with seed: 961863, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:07:47.132 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:07:47.326 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:47.352 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:47.352 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:07:47.411 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:07:47.411 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:47.413 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:07:47.472 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:07:47.473 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:07:47.475 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:47.476 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:47.476 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:47.476 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:47.587 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:47.588 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................... -22:07:47.750 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:07:47.802 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:47.802 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:47.803 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:47.855 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -22:07:49.569 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:49.574 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:07:49.628 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:07:50.357 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 65 ---- -Running ExUnit with seed: 803086, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:07:50.989 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -22:07:51.299 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:51.299 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:51.351 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:07:51.411 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:51.411 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:07:51.412 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:51.412 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:07:51.567 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:07:51.626 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:51.630 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:51.631 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:51.631 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:51.688 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:07:51.691 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:07:51.691 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:51.692 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:51.692 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:51.692 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:07:51.748 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:07:53.412 [info] beam_mcp: refused by host authorize/1: :nope -. -22:07:53.415 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:07:53.417 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:07:54.198 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 66 ---- -Running ExUnit with seed: 623627, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:07:54.815 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:07:55.038 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:55.039 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:55.042 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:55.042 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:55.042 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:55.094 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:07:55.100 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:55.105 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:07:55.211 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:55.211 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:07:55.265 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:07:55.266 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:55.271 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:07:55.271 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:55.375 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:07:55.478 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:07:55.537 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:55.538 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:07:55.538 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....................... -22:07:56.556 [info] beam_mcp: refused by host authorize/1: :nope -... -22:07:57.975 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:07:57.979 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:07:58.004 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 67 ---- -Running ExUnit with seed: 469935, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:07:58.612 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:07:58.848 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:07:58.919 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:58.919 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:07:58.921 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:07:58.927 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:07:58.985 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:58.986 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:58.986 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:07:58.990 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:07:58.990 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:07:59.095 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:07:59.202 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:07:59.202 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:59.205 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:07:59.364 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:59.364 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:07:59.364 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:07:59.417 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:07:59.417 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:01.076 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:08:01.082 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:01.085 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:08:01.144 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 68 ---- -Running ExUnit with seed: 309464, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:08:02.447 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -22:08:02.724 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:02.725 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:08:02.726 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:02.727 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:02.727 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:02.735 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:02.735 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:02.796 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:08:03.005 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:03.006 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:08:03.064 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:03.064 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:08:03.065 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:03.065 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:03.065 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:03.066 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:03.066 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:03.124 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -22:08:03.230 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:08:04.906 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:05.692 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:05.698 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:08:05.721 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 69 ---- -Running ExUnit with seed: 133607, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:08:06.315 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:08:06.488 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:06.505 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:06.514 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:06.516 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:06.517 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:06.517 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:06.521 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:08:06.526 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:06.636 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:06.637 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:06.637 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:08:06.751 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:06.853 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:08:06.905 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:08:06.959 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:06.959 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:06.965 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:08:07.018 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:07.018 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:08:08.717 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:08:08.776 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:09.487 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:08:09.504 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 70 ---- -Running ExUnit with seed: 966770, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:08:10.109 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -22:08:10.347 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:10.348 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:10.456 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:10.516 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:10.568 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:10.626 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:10.631 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:10.686 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:08:10.691 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:10.692 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:08:10.696 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:10.696 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:08:10.801 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:08:10.916 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:10.917 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:10.917 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:10.917 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:08:10.918 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:08:10.919 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:08:11.845 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:11.901 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:11.906 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:08:12.614 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 71 ---- -Running ExUnit with seed: 808059, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -22:08:13.991 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:08:14.180 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:08:14.186 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:14.205 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:14.205 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:14.261 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:14.261 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:14.261 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:14.266 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:14.269 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:14.272 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:14.272 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:14.273 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:08:14.334 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:08:14.395 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:14.395 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:08:14.449 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:08:14.656 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:14.657 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:14.709 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................. -22:08:17.147 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:08:17.224 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:17.229 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:08:17.233 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 72 ---- -Running ExUnit with seed: 655926, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:08:17.866 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:08:18.081 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:18.088 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:18.088 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:08:18.090 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:08:18.203 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:08:18.261 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:18.315 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:08:18.372 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:08:18.374 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:18.374 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:18.377 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:18.379 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:18.379 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:18.380 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:18.380 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:08:18.380 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:18.381 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:18.381 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:08:18.434 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:08:19.578 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:08:19.581 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:21.000 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:08:21.091 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 73 ---- -Running ExUnit with seed: 510179, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:08:21.686 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -22:08:21.890 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:21.901 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:21.901 [info] beam_mcp: refused by host authorize/1: :nope -.............. -22:08:21.954 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:08:21.959 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:08:22.012 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -22:08:22.117 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:22.117 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:22.222 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:22.222 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:22.223 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:22.223 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:08:22.392 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:22.393 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:22.397 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:22.397 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:08:22.450 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:22.451 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:22.457 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:08:23.442 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:08:23.448 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:08:24.953 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:24.959 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 74 ---- -Running ExUnit with seed: 375465, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:08:25.558 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:08:25.776 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:25.777 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:25.777 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:25.786 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:25.851 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:25.851 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:08:25.852 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:25.905 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:25.913 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:08:25.914 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:25.914 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:25.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:08:26.023 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..................... -22:08:26.083 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:26.193 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:26.193 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:26.194 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:26.194 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:08:26.246 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -22:08:28.005 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:28.024 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:08:28.734 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:08:28.814 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 75 ---- -Running ExUnit with seed: 239029, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -22:08:29.418 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:08:29.606 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:29.623 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:29.676 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:08:29.734 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:08:29.734 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:29.734 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:29.739 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:29.740 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:08:29.903 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:29.904 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:29.904 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:29.908 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:29.909 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:29.909 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:08:29.961 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:08:30.013 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:08:30.070 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:30.122 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:30.174 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:08:31.827 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:08:32.615 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:32.634 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:08:32.642 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 76 ---- -Running ExUnit with seed: 68542, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:08:33.212 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -22:08:33.460 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:33.515 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:33.568 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:33.570 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:33.622 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:33.622 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:33.622 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:33.731 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:33.734 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:33.735 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -22:08:33.788 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:33.788 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:33.788 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:33.846 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:33.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:08:33.902 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:08:33.955 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:08:34.021 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:08:34.023 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:08:35.022 [info] beam_mcp: refused by host authorize/1: :nope -... -22:08:35.793 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:35.800 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:08:35.803 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 77 ---- -Running ExUnit with seed: 980219, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:08:37.139 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:08:37.348 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:37.365 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:08:37.366 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:37.366 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:08:37.469 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:37.470 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:08:37.529 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:37.534 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:37.534 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:08:37.646 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:08:37.646 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:08:37.751 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:37.752 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:37.752 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:37.752 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:37.804 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:08:37.811 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:37.812 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:37.870 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -22:08:39.616 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:39.670 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:39.677 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:08:40.387 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 78 ---- -Running ExUnit with seed: 835920, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:08:40.971 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:08:41.243 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:41.249 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:08:41.251 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:41.252 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:08:41.309 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:41.313 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:41.313 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:41.366 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:08:41.418 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:08:41.631 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:41.636 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:08:41.742 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:41.742 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:41.742 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:41.745 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:08:41.745 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:41.746 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:08:41.746 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:08:41.755 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:42.788 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:08:42.797 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:42.799 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:08:42.802 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 79 ---- -Running ExUnit with seed: 595131, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -22:08:44.794 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:08:45.084 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:45.085 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:45.085 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:08:45.089 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:08:45.144 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:08:45.249 [info] beam_mcp: refused by host authorize/1: :nope -... -22:08:45.300 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:45.302 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:08:45.361 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:08:45.363 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -22:08:45.369 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:45.370 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:45.371 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -22:08:45.527 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:45.532 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:45.533 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:08:45.533 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:08:45.538 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:45.539 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:08:46.549 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:08:47.260 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:08:47.971 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:48.050 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 80 ---- -Running ExUnit with seed: 479750, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:08:48.625 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -22:08:48.892 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:48.893 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:48.893 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:48.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:48.900 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:08:48.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:08:48.900 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................. -22:08:48.957 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:48.957 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:48.957 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:08:49.014 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:08:49.124 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:08:49.127 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:49.127 [info] beam_mcp: refused by host authorize/1: :nope -............ -22:08:49.291 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:49.298 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:49.298 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:49.298 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:49.302 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:08:50.413 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:08:51.140 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:51.144 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:08:51.932 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.8s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 81 ---- -Running ExUnit with seed: 354943, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:08:52.515 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:08:52.729 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:08:52.731 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:52.731 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:52.731 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -22:08:52.888 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:08:53.049 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:53.050 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:53.050 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:53.052 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:53.053 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:53.057 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:08:53.057 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:08:53.122 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:53.122 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:08:53.227 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:53.227 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:53.232 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:53.289 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:08:53.289 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:08:54.273 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:08:54.331 [info] beam_mcp: refused by host authorize/1: :nope -... -22:08:54.348 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:08:55.769 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 82 ---- -Running ExUnit with seed: 217385, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:08:56.427 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:08:56.695 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:56.695 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:08:56.751 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -22:08:56.807 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:08:56.858 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:56.865 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:56.866 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:56.866 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:08:56.972 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:08:56.976 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:08:56.977 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:56.977 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:08:56.978 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:08:57.039 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:08:57.151 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:57.152 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:08:57.152 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:08:57.152 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:08:57.153 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:08:58.173 [info] beam_mcp: refused by host authorize/1: :nope -... -22:08:58.885 [info] beam_mcp: refused by host authorize/1: :nope -. -22:08:58.888 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -22:08:59.600 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 83 ---- -Running ExUnit with seed: 98713, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:09:00.306 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -22:09:00.482 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:00.537 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:09:00.537 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:09:00.541 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:00.541 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:00.541 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:00.544 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:00.550 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:09:00.602 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:09:00.609 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:00.614 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:09:00.668 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:00.720 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:00.722 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:00.775 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:09:00.780 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:00.780 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:09:00.892 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:00.892 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:09:02.001 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:09:03.431 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:09:03.514 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:03.519 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 84 ---- -Running ExUnit with seed: 934405, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -22:09:04.077 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:09:04.353 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:09:04.407 [info] beam_mcp: refused by host authorize/1: :nope -........ -22:09:04.511 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:09:04.569 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:09:04.682 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:04.683 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:04.683 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:04.684 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:04.684 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:09:04.694 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:09:04.696 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:04.696 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:04.699 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:04.700 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:09:04.700 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:09:04.807 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:04.860 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:04.861 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:04.861 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:09:05.788 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:09:07.295 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:07.300 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:09:07.304 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 85 ---- -Running ExUnit with seed: 727916, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:09:07.931 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:09:08.093 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:08.093 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:08.094 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:08.094 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -22:09:08.214 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:08.324 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:08.326 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:09:08.327 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:08.327 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:08.380 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:08.381 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:08.442 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:08.442 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -22:09:08.506 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:08.559 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:09:08.611 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:08.612 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:09:08.616 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:08.616 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -22:09:09.708 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:09.712 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:09:09.715 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -22:09:11.144 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 86 ---- -Running ExUnit with seed: 597877, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -22:09:11.778 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:09:11.967 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:11.983 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:12.047 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:12.047 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:09:12.105 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:09:12.157 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:09:12.210 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:09:12.217 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:12.217 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:12.269 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:09:12.323 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -22:09:12.382 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:12.440 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:12.440 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:12.440 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:12.500 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:12.553 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:12.553 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:12.553 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:09:13.517 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:09:13.576 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:13.581 [info] beam_mcp: refused by host authorize/1: :nope -... -22:09:14.997 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 87 ---- -Running ExUnit with seed: 489144, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -22:09:15.658 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -22:09:15.903 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:16.060 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:09:16.122 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} - -22:09:16.124 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:09:16.125 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:16.125 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:16.178 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:16.230 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:09:16.291 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:16.351 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:16.351 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:09:16.404 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:16.404 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:16.404 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:16.404 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:16.410 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:16.411 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:16.411 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:16.411 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -22:09:17.449 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:17.455 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:09:18.170 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:18.173 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 88 ---- -Running ExUnit with seed: 387201, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -22:09:19.530 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -22:09:19.752 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -22:09:19.868 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:19.925 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:19.976 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:09:19.978 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:09:19.981 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -22:09:20.085 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:09:20.138 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:20.145 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:20.145 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:20.197 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:20.202 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:09:20.260 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:20.261 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:20.269 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:20.321 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:20.321 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:20.322 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:20.322 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:21.375 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:09:21.391 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:09:21.396 [info] beam_mcp: refused by host authorize/1: :nope -... -22:09:22.110 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 89 ---- -Running ExUnit with seed: 275027, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -22:09:23.412 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -22:09:23.796 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:09:23.796 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:09:23.797 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:23.797 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:09:23.799 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:23.805 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:09:23.862 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:23.863 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:23.863 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:23.867 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:23.871 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:23.872 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -22:09:23.975 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:24.027 [info] beam_mcp: refused by host authorize/1: :nope -......... -22:09:24.088 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:24.088 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:24.088 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:24.089 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:24.089 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................ -22:09:25.147 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:09:25.914 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:25.918 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:25.921 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 90 ---- -Running ExUnit with seed: 76170, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:09:27.285 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -22:09:27.461 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:09:27.516 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:27.522 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:27.527 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:27.580 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:27.581 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:09:27.634 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:09:27.637 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:27.637 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:09:27.637 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:27.637 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:27.638 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:27.743 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:27.743 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:27.796 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:27.796 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................................. -22:09:27.955 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -22:09:27.963 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:27.964 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:09:29.036 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:09:30.456 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:09:30.535 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:30.540 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 91 ---- -Running ExUnit with seed: 975591, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -22:09:31.144 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:09:31.362 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -22:09:31.475 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:09:31.527 [info] beam_mcp: refused by host authorize/1: :nope -........... -22:09:31.640 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:31.692 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:31.692 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:31.693 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:31.693 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:31.693 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:31.693 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:31.694 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:31.694 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:09:31.753 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:31.815 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:09:31.816 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:31.816 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:31.816 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -22:09:31.820 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:31.928 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:09:34.345 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:34.349 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:09:34.353 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:09:34.435 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 92 ---- -Running ExUnit with seed: 868009, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:09:35.081 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -22:09:35.231 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:35.289 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:35.290 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:35.291 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:09:35.449 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -22:09:35.452 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:09:35.452 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:09:35.509 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -22:09:35.521 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:09:35.521 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:35.522 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:35.522 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:35.522 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:09:35.576 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:09:35.741 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:35.741 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:35.745 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:35.798 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:35.798 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:09:36.748 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:09:36.754 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:36.810 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:09:38.236 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 93 ---- -Running ExUnit with seed: 714841, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:09:38.901 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -22:09:39.108 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -22:09:39.224 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:39.225 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:39.285 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:39.286 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:09:39.289 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:39.293 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:39.294 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:39.345 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................... -22:09:39.562 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:39.563 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:39.563 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -22:09:39.616 [info] beam_mcp: refused by host authorize/1: :nope -....... -22:09:39.670 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:39.676 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:39.676 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:39.677 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:39.677 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:39.677 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:09:40.732 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:40.736 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:09:41.448 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:09:41.451 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 94 ---- -Running ExUnit with seed: 631256, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -22:09:42.819 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -22:09:43.028 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:09:43.028 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:43.029 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:43.046 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:43.049 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -22:09:43.103 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:43.104 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:09:43.158 [info] beam_mcp: refused by host authorize/1: :nope -..... -22:09:43.210 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -22:09:43.266 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:43.271 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:43.271 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -22:09:43.376 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -22:09:43.443 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:43.445 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:43.497 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:43.497 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:43.497 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:43.498 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:09:45.314 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:09:45.318 [info] beam_mcp: refused by host authorize/1: :nope -... -22:09:46.038 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:09:46.115 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 95 ---- -Running ExUnit with seed: 546263, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -22:09:46.761 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -22:09:46.950 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:46.954 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:09:47.063 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:47.069 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:47.076 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -22:09:47.130 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:47.132 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:09:47.134 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:47.140 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -22:09:47.140 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -22:09:47.245 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:47.246 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:47.246 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:09:47.247 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:09:47.353 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -22:09:47.461 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:47.461 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:47.461 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:47.461 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:09:48.502 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:09:48.508 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -22:09:48.525 [info] beam_mcp: refused by host authorize/1: :nope -... -22:09:50.017 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 96 ---- -Running ExUnit with seed: 445134, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -22:09:50.636 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -22:09:50.836 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:09:50.839 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:50.913 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:50.913 [info] beam_mcp: refused by host authorize/1: :nope -.......... -22:09:51.018 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -22:09:51.082 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:51.082 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -22:09:51.140 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:51.246 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:09:51.299 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:51.299 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:09:51.358 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:51.358 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:51.359 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:51.359 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:51.359 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:51.359 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:51.360 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:51.418 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -22:09:52.437 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:52.493 [info] beam_mcp: refused by host authorize/1: :nope -. -22:09:52.497 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -22:09:52.499 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 97 ---- -Running ExUnit with seed: 374146, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -22:09:54.555 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -22:09:54.748 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:54.801 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:09:54.860 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:54.916 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:54.916 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:54.916 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:54.973 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -22:09:54.973 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -22:09:55.139 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:55.139 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:09:55.192 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:55.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:09:55.245 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:09:55.298 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -22:09:55.303 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:55.304 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -22:09:55.304 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:55.304 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:55.308 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:09:56.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:09:56.336 [info] beam_mcp: refused by host authorize/1: :nope -.. -22:09:57.049 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -22:09:57.765 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 98 ---- -Running ExUnit with seed: 229344, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -22:09:58.434 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -22:09:58.601 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:58.602 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:09:58.657 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:09:58.658 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:09:58.662 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -22:09:58.716 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:58.720 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -22:09:58.772 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:58.779 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:09:58.780 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -22:09:58.833 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:09:58.834 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:58.834 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:09:58.886 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:09:58.990 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -22:09:58.996 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:58.996 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:09:58.996 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:09:59.008 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -22:10:00.127 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:00.132 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -22:10:00.898 [info] beam_mcp: refused by host authorize/1: :nope -... -22:10:01.613 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 99 ---- -Running ExUnit with seed: 77825, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -22:10:02.236 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......................... -22:10:02.496 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:02.497 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:02.497 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:02.504 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -22:10:02.612 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -22:10:02.678 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:02.678 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:02.679 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -22:10:02.681 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:02.733 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:02.734 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:02.734 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -22:10:02.786 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:02.793 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:02.850 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -22:10:02.902 [info] beam_mcp: refused by host authorize/1: :nope -.... -22:10:03.010 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:10:03.011 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:03.013 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -22:10:05.411 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -22:10:05.418 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:10:05.422 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:05.499 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 100 ---- -Running ExUnit with seed: 939520, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -22:10:06.148 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -22:10:06.308 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -22:10:06.308 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:06.315 [info] beam_mcp: refused by host authorize/1: :nope -...... -22:10:06.371 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -22:10:06.371 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -22:10:06.374 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -22:10:06.374 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:06.374 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -22:10:06.485 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -22:10:06.485 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -22:10:06.488 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -22:10:06.593 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -22:10:06.599 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -22:10:06.766 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -22:10:06.767 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:06.767 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -22:10:06.767 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -22:10:06.768 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........... -22:10:06.822 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -22:10:07.822 [info] beam_mcp: refused by host authorize/1: :nope -. -22:10:07.879 [info] beam_mcp: refused by host authorize/1: :nope -... -22:10:07.895 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -22:10:07.897 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 - -== red-rate-mc64-idle: 1 run(s) of 100 exited non-zero == diff --git a/slices/006-harness-honesty/logs/red-rate-mc8-idle.txt b/slices/006-harness-honesty/logs/red-rate-mc8-idle.txt deleted file mode 100644 index d6b2fc75..00000000 --- a/slices/006-harness-honesty/logs/red-rate-mc8-idle.txt +++ /dev/null @@ -1,25143 +0,0 @@ -== red-rate-mc8-idle == -command: mix test --max-cases 8 (x100 consecutive runs) -background load: 0 concurrent cpu hogs -host: Linux 6.14.0-37-generic cores=32 -tree: a02e5603e6a26ff91af775a0b4cd1d88943c707b dirty=1 -date: 2026-09-08T01:14:15Z - ----- run 1 ---- -Running ExUnit with seed: 600066, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:14:15.848 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -21:14:16.019 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:14:16.022 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:14:16.137 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:14:16.145 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:16.145 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:16.146 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:14:16.300 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:16.300 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:16.300 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:16.357 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:16.357 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:14:16.413 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:14:16.465 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:16.465 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:14:16.519 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:14:16.524 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:14:16.529 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:16.580 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:16.581 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:14:17.516 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:14:18.240 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:18.243 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:14:19.028 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 2 ---- -Running ExUnit with seed: 434979, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:14:19.582 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:14:19.812 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:19.818 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:19.818 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:14:19.925 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:19.925 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:19.926 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:19.979 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:20.030 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:20.031 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:20.031 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:20.031 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:20.032 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:20.032 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:14:20.032 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -21:14:20.190 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:20.196 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:14:20.253 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:14:20.308 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:14:20.372 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:14:21.377 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:21.380 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:14:22.140 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:14:22.870 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 3 ---- -Running ExUnit with seed: 313330, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -21:14:23.473 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -21:14:23.687 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:23.687 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:23.795 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:23.796 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -21:14:23.854 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:23.858 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:23.859 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -21:14:23.922 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:23.926 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:23.926 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:14:23.978 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:23.978 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:14:23.978 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:23.979 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:24.082 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:24.135 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:24.135 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:24.136 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:24.136 [info] beam_mcp: refused by host authorize/1: :nope -................ -21:14:25.219 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:14:25.278 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:14:26.695 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:14:26.717 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 4 ---- -Running ExUnit with seed: 144444, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -21:14:27.289 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:14:27.530 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:14:27.637 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:27.639 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:14:27.693 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:27.698 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:27.699 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...................... -21:14:27.756 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:27.756 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:27.757 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:27.757 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:27.760 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:27.761 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:27.815 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:27.815 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:14:27.969 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:27.969 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:14:28.027 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:14:28.027 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:28.027 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:14:29.038 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:14:29.045 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:14:30.535 [info] beam_mcp: refused by host authorize/1: :nope -... -21:14:30.556 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 5 ---- -Running ExUnit with seed: 980983, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -21:14:31.122 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -21:14:31.377 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:31.431 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:14:31.433 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:14:31.435 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:31.442 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:31.442 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:31.442 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:31.442 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:31.442 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:31.443 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:31.553 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:31.662 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:14:31.774 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:31.775 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:14:31.827 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:14:31.827 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:14:31.879 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:31.930 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:14:31.938 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:14:32.912 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:14:32.921 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:14:32.976 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:32.981 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 6 ---- -Running ExUnit with seed: 881308, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -21:14:35.033 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -21:14:35.266 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:14:35.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:35.279 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:14:35.333 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:35.339 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:35.395 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:35.395 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:35.395 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:35.400 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:14:35.459 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:14:35.562 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:35.568 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:35.618 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:14:35.670 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:35.670 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:14:35.774 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:35.775 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:35.775 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:35.779 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:14:36.746 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:36.752 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:14:37.464 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:14:37.552 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 7 ---- -Running ExUnit with seed: 739602, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:14:38.899 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -21:14:39.175 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:14:39.279 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:39.281 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:14:39.281 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:14:39.333 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:39.334 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:39.391 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:39.442 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:39.442 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:39.442 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:39.444 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:39.445 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:14:39.496 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:39.496 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:14:39.497 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:39.503 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:39.561 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:14:39.670 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:39.670 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:14:41.355 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -21:14:42.081 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:42.085 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:14:42.163 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 8 ---- -Running ExUnit with seed: 562326, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -21:14:42.728 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -21:14:42.927 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -21:14:43.086 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:14:43.087 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:43.087 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:43.087 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:43.088 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:43.088 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:43.090 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:14:43.198 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:43.199 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:43.256 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:43.311 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:43.362 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:43.365 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:43.366 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:43.366 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:14:43.423 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:43.427 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:14:43.485 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:14:44.416 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:14:44.484 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:14:45.194 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:14:45.904 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 9 ---- -Running ExUnit with seed: 368499, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -21:14:46.512 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -21:14:46.788 [info] beam_mcp: refused by host authorize/1: :nope -........ -21:14:46.999 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:14:47.006 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:47.006 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:47.006 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:47.007 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:47.007 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:47.060 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:14:47.117 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:47.121 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:47.122 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:47.123 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:14:47.176 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:14:47.177 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:14:47.231 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:14:47.283 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:47.284 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:47.284 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:47.290 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:48.264 [info] beam_mcp: refused by host authorize/1: :nope -. -21:14:48.324 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:14:48.330 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:14:48.336 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 10 ---- -Running ExUnit with seed: 216362, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:14:50.434 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:14:50.597 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:14:50.649 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:50.650 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:50.651 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -21:14:50.713 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:14:50.819 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:14:50.819 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:14:50.823 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:50.823 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:50.827 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:50.827 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:14:50.929 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:50.929 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:50.930 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:50.981 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:14:51.091 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:51.092 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:51.092 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:51.099 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:14:52.081 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:14:53.574 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:14:53.593 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:14:53.597 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 11 ---- -Running ExUnit with seed: 11621, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -21:14:54.185 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -21:14:54.430 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:54.430 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:54.441 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:54.444 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:54.455 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:54.459 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:54.460 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:54.460 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:54.460 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:54.518 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:54.518 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:14:54.630 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:54.630 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:54.630 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:14:54.784 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:54.792 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:14:54.845 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:14:54.897 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:14:54.948 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........................ -21:14:56.653 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:14:57.438 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:14:57.446 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:14:57.449 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 12 ---- -Running ExUnit with seed: 841404, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -21:14:58.058 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:14:58.241 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....... -21:14:58.301 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -21:14:58.366 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:58.370 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:58.371 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:14:58.426 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:14:58.428 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:14:58.428 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:14:58.634 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:14:58.686 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:58.686 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:58.686 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:14:58.693 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:14:58.697 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:58.749 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:14:58.750 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:14:58.750 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:14:58.750 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:14:58.750 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -21:15:00.502 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:15:00.505 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:01.292 [info] beam_mcp: refused by host authorize/1: :nope -. -21:15:01.297 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 13 ---- -Running ExUnit with seed: 690636, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -21:15:01.908 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -21:15:02.080 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:02.100 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:02.110 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:02.219 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:02.219 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:02.221 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:15:02.222 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:15:02.223 [info] beam_mcp: refused by host authorize/1: :nope -................. -21:15:02.276 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:02.277 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:02.393 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:02.394 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:02.394 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:02.394 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:02.394 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:02.395 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:15:02.447 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:15:02.502 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:15:02.554 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:15:03.696 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:04.406 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:15:05.128 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:15:05.136 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 14 ---- -Running ExUnit with seed: 563548, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:15:05.736 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:15:05.975 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -21:15:06.195 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:15:06.197 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:15:06.249 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:06.249 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:06.250 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:06.250 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:06.250 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:06.250 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:06.252 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:15:06.257 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:06.266 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:15:06.321 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:06.379 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:06.380 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:15:06.432 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:15:06.433 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:06.484 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:06.535 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:15:08.173 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:15:08.179 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:15:08.251 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:08.962 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 15 ---- -Running ExUnit with seed: 421170, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -21:15:09.605 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -21:15:09.879 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:09.879 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:09.993 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:15:09.994 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:10.096 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:10.096 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:10.105 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:15:10.165 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:15:10.224 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:10.224 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -21:15:10.285 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:10.285 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:15:10.285 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:10.285 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:10.285 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:10.286 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:10.337 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:15:10.389 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:15:10.444 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:12.162 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:15:12.165 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:15:12.872 [info] beam_mcp: refused by host authorize/1: :nope -. -21:15:12.928 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 16 ---- -Running ExUnit with seed: 377615, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:15:13.598 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -21:15:13.801 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:13.801 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:13.814 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:15:13.826 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:13.827 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:15:13.932 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:13.945 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:13.946 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:15:13.998 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:13.999 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:15:14.122 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:14.128 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:15:14.144 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:14.196 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:14.196 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:14.197 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:15:14.302 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:14.302 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:15:14.406 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -21:15:16.143 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:16.157 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:15:16.221 [info] beam_mcp: refused by host authorize/1: :nope -. -21:15:16.228 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -Finished in 3.5 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 17 ---- -Running ExUnit with seed: 416255, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:15:17.656 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -21:15:17.972 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:17.973 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:15:18.034 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:18.035 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:18.090 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:15:18.091 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:15:18.142 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:18.246 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:18.253 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:18.253 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:15:18.305 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:15:18.305 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:18.306 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:18.313 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:18.314 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:15:18.472 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:18.472 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:18.472 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:18.473 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:19.451 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:15:20.163 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:15:20.876 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:20.949 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.5 seconds (1.0s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 18 ---- -Running ExUnit with seed: 350736, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:15:21.536 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -21:15:21.794 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:15:21.810 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:15:21.869 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:21.870 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -21:15:21.871 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:21.871 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:15:21.922 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:21.923 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:15:22.080 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:15:22.242 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:22.243 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:22.243 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:22.244 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:22.256 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:22.308 [info] beam_mcp: refused by host authorize/1: :nope -. -21:15:22.368 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:22.369 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:22.374 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:22.383 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:15:24.128 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:15:24.141 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:15:24.209 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:24.921 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.5 seconds (1.0s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 19 ---- -Running ExUnit with seed: 415311, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:15:25.601 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:15:25.881 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:25.934 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:15:25.944 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:15:25.945 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:25.997 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -....................... -21:15:26.155 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:15:26.257 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:15:26.263 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:26.270 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:26.270 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:26.271 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:15:26.322 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:26.323 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:26.323 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:26.323 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:26.323 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:26.375 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:26.442 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:26.451 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:15:28.219 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:15:28.234 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:15:28.241 [info] beam_mcp: refused by host authorize/1: :nope -. -21:15:28.298 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.5 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 20 ---- -Running ExUnit with seed: 418213, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -21:15:29.565 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................ -21:15:29.842 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:29.842 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:29.856 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:29.864 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:15:29.916 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:15:29.917 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:29.970 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:29.970 [info] beam_mcp: refused by host authorize/1: :nope -........ -21:15:30.076 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -21:15:30.081 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:30.084 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:30.085 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:15:30.089 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:15:30.147 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:30.199 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:30.200 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:30.200 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:30.200 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:30.200 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................................ -21:15:32.165 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:15:32.169 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:32.883 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:15:32.952 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.5 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 21 ---- -Running ExUnit with seed: 360024, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:15:33.508 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -21:15:33.881 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:33.986 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:15:33.989 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:33.990 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:15:34.100 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:34.108 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:34.110 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:15:34.161 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:34.170 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:34.228 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:34.228 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:34.229 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:34.231 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:34.232 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:15:34.283 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:34.285 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:34.337 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:34.338 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:34.338 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............................. -21:15:35.454 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:15:35.527 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:36.240 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:36.951 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.5 seconds (0.9s async, 2.6s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 22 ---- -Running ExUnit with seed: 545166, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -21:15:37.785 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -21:15:38.094 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:38.094 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:38.100 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:38.152 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:38.164 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:38.172 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:38.173 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:38.174 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:38.174 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:15:38.178 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:15:38.178 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:15:38.239 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:38.291 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:15:38.294 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:38.294 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:15:38.508 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:38.560 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -21:15:38.623 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:15:38.675 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:15:39.694 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:39.715 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:15:40.425 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:15:40.484 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.6 seconds (1.0s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 23 ---- -Running ExUnit with seed: 672226, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:15:41.900 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -21:15:42.116 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:42.116 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:42.117 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:42.130 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:15:42.139 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:42.140 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:15:42.193 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:42.196 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:42.196 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:42.300 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -21:15:42.358 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:42.365 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:15:42.424 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:42.424 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:15:42.476 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:15:42.482 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:15:42.534 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:15:42.587 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:42.593 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:15:43.690 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:15:45.110 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:15:45.114 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:15:45.184 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 24 ---- -Running ExUnit with seed: 588965, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:15:45.771 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -21:15:46.014 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:46.014 [info] beam_mcp: refused by host authorize/1: :nope -............ -21:15:46.125 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:15:46.126 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:46.128 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:46.128 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -21:15:46.245 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:46.300 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:15:46.404 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:46.404 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:46.404 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:46.410 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:46.462 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:15:46.565 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:15:46.572 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:46.573 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:46.573 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:46.573 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:46.574 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:15:47.538 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:15:48.961 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:15:49.029 [info] beam_mcp: refused by host authorize/1: :nope -. -21:15:49.033 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 25 ---- -Running ExUnit with seed: 422600, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -......................................... -21:15:49.613 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:15:49.831 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:15:49.845 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:49.845 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:49.897 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:15:50.005 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:50.005 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:50.005 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:15:50.113 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:15:50.166 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:15:50.167 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:50.168 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:50.168 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:50.169 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:50.226 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:50.227 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:15:50.278 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:15:50.286 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:50.297 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:50.348 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -21:15:51.437 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:15:51.447 [info] beam_mcp: refused by host authorize/1: :nope -. -21:15:51.509 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:52.220 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 26 ---- -Running ExUnit with seed: 412720, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -21:15:53.668 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -21:15:53.950 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:54.014 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:54.032 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:54.032 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:54.083 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:15:54.087 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:15:54.096 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:15:54.148 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:15:54.250 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:54.251 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:54.251 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:54.302 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:15:54.361 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:54.417 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:54.424 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:15:54.432 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:54.433 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:54.433 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:15:54.433 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:15:55.562 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:15:55.577 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:15:55.652 [info] beam_mcp: refused by host authorize/1: :nope -... -21:15:57.070 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.6 seconds (1.0s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 27 ---- -Running ExUnit with seed: 650384, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:15:57.842 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:15:58.115 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:58.116 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:58.116 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:58.116 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:15:58.147 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:15:58.200 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:58.203 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:15:58.209 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:15:58.315 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:15:58.315 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:15:58.367 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:15:58.368 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:15:58.376 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:15:58.376 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:15:58.376 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:15:58.429 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -21:15:58.430 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:15:58.482 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:15:58.541 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -21:15:59.784 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:15:59.789 [info] beam_mcp: refused by host authorize/1: :nope -... -21:16:00.511 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:00.572 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:300 - Expected truthy, got false - code: assert String.contains?(bytes, "HTTP/1.1 403") - arguments: - - # 1 - "" - - # 2 - "HTTP/1.1 403" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:315: (test) - -.. -Finished in 3.5 seconds (1.0s async, 2.5s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 28 ---- -Running ExUnit with seed: 902307, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -21:16:02.188 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:16:02.594 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:02.600 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:02.601 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:02.615 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:16:02.804 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:02.804 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:02.805 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:02.807 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:02.807 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:02.807 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:02.807 [info] beam_mcp: refused by host authorize/1: :nope -.......... -21:16:02.912 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:16:02.919 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:02.980 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:16:02.985 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:02.988 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:16:03.090 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -21:16:03.193 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:03.193 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:16:05.106 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:05.109 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:05.112 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:16:05.873 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.9 seconds (1.2s async, 2.6s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 29 ---- -Running ExUnit with seed: 246407, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:16:06.461 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -21:16:06.728 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:06.735 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:06.735 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:06.735 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:06.736 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:06.743 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:06.743 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..................... -21:16:06.852 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:16:06.906 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:16:06.957 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:06.957 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:06.957 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:07.014 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:07.015 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:07.019 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:07.019 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:07.019 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:16:07.019 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:16:07.076 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:16:08.128 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:16:08.145 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:08.201 [info] beam_mcp: refused by host authorize/1: :nope -... -21:16:08.915 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 30 ---- -Running ExUnit with seed: 58259, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:16:10.276 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -21:16:10.489 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:10.489 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:10.496 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:10.497 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:10.497 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:10.497 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:10.498 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:16:10.558 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:16:10.620 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:16:10.624 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:16:10.624 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:10.625 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:16:10.678 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:10.682 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:10.684 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:10.684 [info] beam_mcp: refused by host authorize/1: :nope -...................... -21:16:10.943 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:16:10.943 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:10.950 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:16:11.943 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:11.999 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:16:12.707 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:16:12.710 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 31 ---- -Running ExUnit with seed: 849386, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -21:16:14.070 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -21:16:14.307 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:16:14.320 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:14.321 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:14.332 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:16:14.441 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:14.442 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:14.442 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:16:14.443 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:14.444 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:14.444 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:16:14.599 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:16:14.650 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:14.651 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:14.657 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:16:14.811 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:14.812 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:14.812 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:14.812 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:14.863 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -21:16:16.687 [info] beam_mcp: refused by host authorize/1: :nope -... -21:16:17.404 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:16:17.407 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:16:17.423 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.5 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 32 ---- -Running ExUnit with seed: 821612, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -21:16:18.028 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:16:18.274 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:16:18.276 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:16:18.283 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:16:18.335 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:18.341 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:18.342 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:18.343 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:18.343 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:18.343 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:18.344 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:16:18.346 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:18.346 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:18.397 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:18.457 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:18.460 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:16:18.614 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:16:18.621 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:18.621 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:16:18.672 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...................... -21:16:20.538 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:16:20.545 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:16:20.548 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:16:21.257 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 33 ---- -Running ExUnit with seed: 682684, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:16:21.893 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -21:16:22.056 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.................. -21:16:22.267 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:16:22.269 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:22.269 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:16:22.371 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:22.371 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:22.423 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:22.432 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:22.436 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:22.487 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:16:22.494 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:22.494 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:22.497 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:22.498 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:22.498 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:22.498 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:22.502 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:22.553 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:16:22.607 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:16:23.576 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:23.579 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:16:23.634 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:23.637 [info] beam_mcp: refused by host authorize/1: :nope -..... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 34 ---- -Running ExUnit with seed: 471389, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -21:16:25.669 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -21:16:25.921 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:16:26.028 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:16:26.028 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:16:26.032 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:16:26.147 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:26.256 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:26.263 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:26.270 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:26.270 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:26.270 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:26.271 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:26.272 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:26.273 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:16:26.332 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:26.333 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:26.333 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:16:26.333 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:16:26.384 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:26.385 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:16:27.402 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:27.466 [info] beam_mcp: refused by host authorize/1: :nope -... -21:16:28.881 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:16:28.902 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 35 ---- -Running ExUnit with seed: 312561, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:16:29.459 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -21:16:29.733 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:29.786 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:16:29.786 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:16:29.790 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:16:29.953 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:29.954 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:30.056 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:30.057 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:30.061 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:30.061 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:16:30.116 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:30.125 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:30.176 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.......... -21:16:30.178 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:16:30.179 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:30.230 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:30.231 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:30.231 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:30.231 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:16:32.667 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:32.672 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:32.676 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:32.681 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 36 ---- -Running ExUnit with seed: 109005, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:16:33.265 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -21:16:33.485 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:16:33.540 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:16:33.542 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:33.542 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:16:33.697 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:33.702 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:33.706 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:33.708 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:33.709 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:16:33.761 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:33.812 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:33.813 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:33.813 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:16:33.872 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:33.872 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:16:33.929 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:16:33.930 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:33.931 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:33.935 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -21:16:35.028 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:35.030 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:16:35.796 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:35.799 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 37 ---- -Running ExUnit with seed: 970931, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -21:16:37.114 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -21:16:37.441 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:16:37.503 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:16:37.504 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:16:37.505 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:37.505 [info] beam_mcp: refused by host authorize/1: :nope -............. -21:16:37.557 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:37.557 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:37.557 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:16:37.559 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:37.559 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:37.560 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:37.616 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:37.671 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:37.723 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:37.723 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:37.724 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:16:37.781 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:37.782 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:37.834 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -21:16:39.562 [info] beam_mcp: refused by host authorize/1: :nope -... -21:16:40.361 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:40.366 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:16:40.370 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 38 ---- -Running ExUnit with seed: 799983, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -21:16:40.957 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -21:16:41.166 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:41.225 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:41.231 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:41.231 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:16:41.234 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:16:41.236 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:16:41.246 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:41.247 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:41.247 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:41.300 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:16:41.301 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:16:41.409 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:41.460 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:41.461 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:41.461 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:41.513 [info] beam_mcp: refused by host authorize/1: :nope -........ -21:16:41.622 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:16:41.674 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:16:41.675 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:16:44.140 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:44.217 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:44.222 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:16:44.226 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 39 ---- -Running ExUnit with seed: 655222, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:16:44.812 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -21:16:45.054 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:45.062 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:16:45.062 [info] beam_mcp: refused by host authorize/1: :nope -... -21:16:45.116 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:45.116 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:16:45.116 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:45.116 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:45.117 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:45.226 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:45.229 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:16:45.284 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -21:16:45.439 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:45.541 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:16:45.547 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:45.549 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:45.549 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:45.549 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:45.550 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:45.550 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -21:16:46.572 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:16:48.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:16:48.066 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:16:48.073 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 40 ---- -Running ExUnit with seed: 452943, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -21:16:48.611 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -21:16:48.820 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:16:48.820 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:16:48.983 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:48.984 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:48.984 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:48.994 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:16:49.047 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:16:49.101 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:49.101 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:16:49.102 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:16:49.157 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:49.157 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:49.213 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:49.213 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:49.265 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:49.270 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:16:49.322 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:16:49.373 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:49.373 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:50.396 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:16:51.124 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:16:51.834 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:16:51.838 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 41 ---- -Running ExUnit with seed: 270829, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:16:52.442 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -21:16:52.662 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -21:16:52.732 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:52.733 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:16:52.787 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:16:52.797 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:52.797 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:52.802 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:16:52.854 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:16:52.854 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:52.855 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:52.855 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:52.855 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:52.906 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:16:53.014 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:53.014 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:53.018 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:16:53.074 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:53.125 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:53.125 [info] beam_mcp: refused by host authorize/1: :nope -............ -21:16:54.220 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:16:54.942 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:16:55.655 [info] beam_mcp: refused by host authorize/1: :nope -. -21:16:55.733 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 42 ---- -Running ExUnit with seed: 165949, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:16:56.376 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -21:16:56.682 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:56.735 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:16:56.788 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:56.788 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:56.789 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:16:56.847 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:56.852 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:56.904 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:16:56.904 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:16:56.957 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:56.957 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:16:56.957 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:16:56.960 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:16:56.960 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:16:56.960 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:16:56.965 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:16:57.019 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:16:57.020 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:16:57.072 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:16:58.007 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:16:58.785 [info] beam_mcp: refused by host authorize/1: :nope -... -21:16:59.499 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:16:59.503 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 43 ---- -Running ExUnit with seed: 953394, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -21:17:00.130 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -21:17:00.352 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:00.355 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:00.356 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:17:00.463 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:00.464 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:00.517 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:17:00.572 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:00.573 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:00.573 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:00.627 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:17:00.631 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:00.683 [info] beam_mcp: refused by host authorize/1: :nope -... -21:17:00.735 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:17:00.791 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:17:00.802 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:00.803 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:17:00.906 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:00.907 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:00.907 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:17:03.267 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:03.271 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:17:03.278 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:17:03.356 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 44 ---- -Running ExUnit with seed: 771829, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:17:03.984 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -21:17:04.143 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:04.147 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:04.202 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:17:04.206 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:04.206 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:17:04.210 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:04.210 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:04.211 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:17:04.317 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:04.317 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:04.317 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:04.319 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:04.326 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:04.326 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..................... -21:17:04.539 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -21:17:04.541 [info] beam_mcp: refused by host authorize/1: :nope -........... -21:17:04.646 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:04.647 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:04.654 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:17:05.720 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:06.429 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:17:07.137 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:17:07.141 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 45 ---- -Running ExUnit with seed: 606578, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:17:07.787 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -21:17:08.001 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:17:08.119 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:08.173 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:17:08.177 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:08.177 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:08.177 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:08.181 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:08.232 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:08.232 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:08.232 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:17:08.286 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:17:08.390 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:08.441 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:17:08.493 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:17:08.499 [info] beam_mcp: refused by host authorize/1: :nope -........ -21:17:08.553 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:08.554 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:08.558 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:08.558 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:09.554 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:17:09.612 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:09.617 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:17:10.329 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 46 ---- -Running ExUnit with seed: 490321, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:17:11.676 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -21:17:11.928 [info] beam_mcp: refused by host authorize/1: :nope -............ -21:17:12.034 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:12.035 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:12.035 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:12.040 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:12.042 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:12.043 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:12.045 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:17:12.102 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:12.103 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:12.154 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:12.157 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:12.157 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:12.157 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -21:17:12.160 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:12.161 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:17:12.269 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:17:12.381 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:12.385 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:13.371 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:13.377 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:17:14.147 [info] beam_mcp: refused by host authorize/1: :nope -... -21:17:14.860 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 47 ---- -Running ExUnit with seed: 308423, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -21:17:15.451 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:17:15.731 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:17:15.736 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:17:15.738 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -21:17:15.855 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:15.962 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:15.963 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:17:16.022 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:16.022 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:16.022 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:16.023 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:16.023 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:17:16.125 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:16.125 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:16.125 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:16.127 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:16.127 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:16.127 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:17:16.184 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:16.191 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:17:17.185 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:17:17.194 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:17.259 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:17:18.677 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 48 ---- -Running ExUnit with seed: 66317, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -21:17:19.210 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..................... -21:17:19.430 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:19.430 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:19.482 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:19.482 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:19.482 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:17:19.642 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:19.647 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:19.647 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:19.705 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:19.705 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:17:19.706 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:19.762 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:17:19.763 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:17:19.767 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:17:19.767 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -21:17:19.877 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:17:19.931 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:19.931 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:19.983 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:20.912 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:17:22.337 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:17:22.393 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:22.397 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 49 ---- -Running ExUnit with seed: 800122, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -21:17:23.010 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -. -21:17:23.187 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:17:23.198 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:23.262 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:23.262 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:23.263 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:17:23.322 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:23.374 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:23.374 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:23.376 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....................... -21:17:23.430 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:23.431 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:17:23.431 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:23.431 [info] beam_mcp: refused by host authorize/1: :nope -... -21:17:23.482 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:17:23.533 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:17:23.533 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:23.534 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:23.534 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:23.540 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................... -21:17:24.783 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:24.791 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:17:25.510 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:25.525 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 50 ---- -Running ExUnit with seed: 673156, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:17:26.832 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -21:17:27.053 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:27.053 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:17:27.159 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -21:17:27.216 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:27.216 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:17:27.326 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:27.381 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:27.381 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:27.382 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:27.434 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:27.434 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:27.434 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:27.440 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:27.444 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:17:27.549 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:27.551 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -21:17:27.604 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:27.605 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:27.605 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -21:17:28.597 [info] beam_mcp: refused by host authorize/1: :nope -... -21:17:29.318 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:17:29.324 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:17:29.379 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 51 ---- -Running ExUnit with seed: 519439, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -21:17:30.720 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -21:17:30.933 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................... -21:17:31.095 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:31.095 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:31.096 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:31.096 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:31.098 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:31.098 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -21:17:31.262 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:31.263 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:31.263 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:31.263 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:31.264 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:17:31.316 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:17:31.376 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:31.428 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:31.486 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:31.490 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:31.495 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:17:31.496 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:17:32.410 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:17:32.466 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:33.175 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:17:33.190 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 52 ---- -Running ExUnit with seed: 354052, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -21:17:34.499 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -21:17:34.726 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:17:34.830 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:34.830 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:34.830 [info] beam_mcp: refused by host authorize/1: :nope -... -21:17:34.883 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:34.946 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:34.951 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:17:35.061 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:17:35.063 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:17:35.063 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:17:35.064 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:35.064 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:35.064 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:35.065 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:17:35.065 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:35.118 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:35.227 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:35.229 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:35.232 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:17:37.666 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:37.677 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:17:37.681 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:17:37.776 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 53 ---- -Running ExUnit with seed: 173883, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -21:17:38.316 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -21:17:38.581 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:38.581 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:17:38.640 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:38.641 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:38.641 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:38.697 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:17:38.755 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:38.806 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:38.865 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:17:38.865 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:38.866 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:17:38.917 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............... -21:17:39.076 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:17:39.077 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:39.078 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:39.078 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:39.130 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:39.130 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:39.130 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:17:40.099 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:40.105 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:17:40.818 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:17:40.884 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 54 ---- -Running ExUnit with seed: 42498, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:17:42.252 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -..... -21:17:42.429 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:17:42.481 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:42.481 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:42.481 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:42.490 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:17:42.543 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:42.594 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:42.648 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:42.656 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:42.658 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:42.769 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:42.769 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:42.825 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:42.826 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:17:42.826 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:42.827 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -21:17:42.882 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:42.884 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:42.884 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:17:43.995 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:44.004 [info] beam_mcp: refused by host authorize/1: :nope -... -21:17:44.019 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:17:44.726 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 55 ---- -Running ExUnit with seed: 898486, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -21:17:46.106 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -21:17:46.273 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:17:46.274 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:46.274 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:46.274 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:46.281 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:17:46.339 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:46.340 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:46.392 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:17:46.402 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:46.402 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:46.404 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:46.404 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:46.456 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:46.461 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:17:46.517 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -21:17:46.621 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:46.621 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:17:46.621 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -21:17:46.726 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:17:47.788 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:17:48.508 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:48.511 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:17:48.566 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 56 ---- -Running ExUnit with seed: 738683, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:17:49.878 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................ -21:17:50.218 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:50.272 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:50.274 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:50.328 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:17:50.329 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:17:50.380 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:50.381 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:17:50.486 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:50.487 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:50.487 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:50.487 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:17:50.543 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:50.547 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:50.547 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:17:50.547 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:50.548 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:50.548 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:50.649 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:17:50.655 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:17:52.315 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:52.318 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:17:52.322 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:17:53.110 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 57 ---- -Running ExUnit with seed: 538510, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -21:17:53.704 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................. -21:17:53.959 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:54.014 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:17:54.067 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:54.067 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:54.067 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:54.067 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:54.068 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:17:54.072 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:17:54.138 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:54.142 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:54.142 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:17:54.143 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:17:54.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:17:54.296 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:17:54.454 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:54.454 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:54.454 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:17:54.461 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:54.465 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:17:55.389 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:17:55.394 [info] beam_mcp: refused by host authorize/1: :nope -... -21:17:56.157 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:17:56.879 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 58 ---- -Running ExUnit with seed: 343285, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:17:57.526 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -21:17:57.750 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:17:57.803 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:17:57.803 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:57.804 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:57.804 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:57.806 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:57.857 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:17:57.960 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:17:57.967 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:17:57.970 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:17:58.022 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:17:58.022 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:58.026 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:17:58.079 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:17:58.079 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:17:58.082 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:17:58.084 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:17:58.198 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:17:58.249 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:17:59.197 [info] beam_mcp: refused by host authorize/1: :nope -. -21:17:59.200 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:17:59.959 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:17:59.966 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 59 ---- -Running ExUnit with seed: 114854, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -21:18:01.258 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...................... -21:18:01.539 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:01.600 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:01.601 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:01.601 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:01.601 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:01.605 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:01.608 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:18:01.763 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:18:01.816 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:18:01.817 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:18:01.818 [info] beam_mcp: refused by host authorize/1: :nope -.............. -21:18:01.924 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:01.935 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:01.936 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:01.936 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:02.044 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:02.045 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:18:02.045 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:18:02.046 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:18:03.755 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:03.759 [info] beam_mcp: refused by host authorize/1: :nope -... -21:18:04.471 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:18:04.476 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 60 ---- -Running ExUnit with seed: 923426, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -21:18:05.134 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:18:05.330 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:18:05.343 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:05.395 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:05.395 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:18:05.502 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:18:05.606 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:18:05.657 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:05.658 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:05.658 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:05.659 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:05.710 [info] beam_mcp: refused by host authorize/1: :nope -........... -21:18:05.775 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:05.775 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:05.775 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:05.778 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:18:05.780 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:18:05.832 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:05.890 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:05.890 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:18:07.644 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:07.649 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:18:08.362 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:08.369 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 61 ---- -Running ExUnit with seed: 797735, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -21:18:09.009 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:18:09.194 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:09.194 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:09.248 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:09.248 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:18:09.306 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:18:09.411 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:09.413 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:18:09.416 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:09.417 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:18:09.472 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:09.477 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:09.529 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:18:09.581 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:09.632 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:18:09.691 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:09.698 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:09.699 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:09.699 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:09.699 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:18:10.739 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:10.756 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:18:11.463 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:18:12.171 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 62 ---- -Running ExUnit with seed: 615408, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................ -21:18:12.764 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................................. -21:18:13.135 [info] beam_mcp: refused by host authorize/1: :nope -............ -21:18:13.238 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:13.238 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:13.238 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:13.239 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:13.239 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:13.297 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:13.298 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:18:13.299 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:18:13.300 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:13.352 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:13.356 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:13.413 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:13.413 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:13.414 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:18:13.417 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:13.417 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:13.417 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:18:13.468 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:18:14.508 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:14.514 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:18:14.519 [info] beam_mcp: refused by host authorize/1: :nope -... -21:18:14.534 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 3.2 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 63 ---- -Running ExUnit with seed: 389264, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:18:16.567 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............ -21:18:16.752 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:16.752 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:16.805 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:16.857 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:16.858 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:16.858 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:16.858 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:16.861 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:18:16.971 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:16.971 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................. -21:18:17.182 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:17.183 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:17.185 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:17.185 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:18:17.243 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:17.244 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........... -21:18:17.300 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:18:17.300 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:18:17.306 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:18:18.283 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:18.291 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:18:19.008 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:19.717 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 64 ---- -Running ExUnit with seed: 155395, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................... -21:18:20.366 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:18:20.564 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:18:20.618 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:20.669 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:18:20.729 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:20.730 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:20.730 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:20.730 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:20.787 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:20.788 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -21:18:20.893 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:20.893 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:20.900 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........... -21:18:20.908 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:20.909 [info] beam_mcp: refused by host authorize/1: :nope -........ -21:18:21.012 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:21.064 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:21.065 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:21.065 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:18:21.123 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:18:22.102 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:18:23.528 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:23.532 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:18:23.536 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 65 ---- -Running ExUnit with seed: 192, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -21:18:24.211 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........ -21:18:24.487 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:24.492 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:24.499 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:18:24.503 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:18:24.664 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:18:24.666 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:18:24.667 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:18:24.773 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:18:24.824 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:18:24.825 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:24.825 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:24.825 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:24.826 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:18:24.877 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:18:24.931 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:24.931 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:24.932 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:24.932 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:24.936 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:18:25.976 [info] beam_mcp: refused by host authorize/1: :nope -... -21:18:26.690 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:18:26.693 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:26.697 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 66 ---- -Running ExUnit with seed: 854789, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:18:27.994 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -21:18:28.219 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:18:28.282 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:18:28.334 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:18:28.439 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:28.439 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:28.439 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:28.496 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:28.496 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:18:28.552 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:28.553 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:28.553 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:28.555 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:18:28.660 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:28.660 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........................... -21:18:28.770 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:28.771 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:28.776 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:28.777 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:28.777 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:18:30.476 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:30.479 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:18:30.536 [info] beam_mcp: refused by host authorize/1: :nope -... -21:18:31.254 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 67 ---- -Running ExUnit with seed: 685356, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:18:31.864 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....................... -21:18:32.157 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:32.157 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:32.158 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:18:32.213 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:32.213 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:32.213 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:32.214 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:18:32.267 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:18:32.320 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:18:32.373 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:32.373 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:18:32.432 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:32.487 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:18:32.492 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:18:32.557 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:18:32.614 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:32.615 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:18:32.615 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:32.615 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:18:33.652 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:33.658 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:33.661 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:18:34.381 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 68 ---- -Running ExUnit with seed: 536245, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:18:35.741 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -21:18:35.904 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:18:36.122 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:36.174 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:18:36.226 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:36.227 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:36.227 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:18:36.229 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:18:36.234 [info] beam_mcp: refused by host authorize/1: :nope -... -21:18:36.288 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -..... -21:18:36.293 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:18:36.302 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:18:36.408 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:36.414 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:36.417 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:36.470 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:36.470 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:36.470 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:36.471 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:36.472 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:18:37.520 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:38.229 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:38.232 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:18:38.235 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 69 ---- -Running ExUnit with seed: 415136, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:18:39.552 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -21:18:39.845 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:18:39.852 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:18:39.957 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:39.957 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:39.957 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:39.960 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:18:39.961 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:18:40.072 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:40.073 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:40.073 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:18:40.074 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:40.078 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:18:40.130 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:40.131 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:18:40.183 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:18:40.287 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:40.339 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:40.345 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:40.345 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:18:41.294 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:41.297 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:18:42.007 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:18:42.064 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 70 ---- -Running ExUnit with seed: 223502, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:18:43.400 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -21:18:43.696 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:18:43.751 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:18:43.751 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:43.808 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:43.809 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:43.809 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:43.867 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:18:43.870 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:43.923 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -21:18:44.027 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:44.027 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:44.029 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:44.081 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:44.082 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:44.082 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:44.141 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:44.141 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:44.149 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:18:44.151 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:18:45.816 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:45.872 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:45.875 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:18:46.584 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 71 ---- -Running ExUnit with seed: 24559, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................. -21:18:47.238 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.. -21:18:47.406 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:47.466 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:47.519 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:47.519 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:47.520 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:47.522 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:18:47.575 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:18:47.576 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:47.580 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:18:47.584 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:18:47.636 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:47.694 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:47.695 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:47.695 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:18:47.747 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:47.748 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............... -21:18:47.853 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:47.853 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:47.859 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:18:49.666 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:18:49.677 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:49.680 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:18:50.464 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 72 ---- -Running ExUnit with seed: 876652, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:18:51.020 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............................... -21:18:51.396 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:18:51.509 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:51.509 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:51.512 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:51.512 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:18:51.569 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:51.571 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:18:51.629 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:51.630 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:51.630 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:51.630 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:51.630 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:51.684 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:51.685 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:51.685 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:51.685 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:51.686 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................ -21:18:51.745 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:18:51.849 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.............. -21:18:53.562 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:53.565 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:53.569 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:18:54.280 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 73 ---- -Running ExUnit with seed: 716041, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -21:18:54.897 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -21:18:55.112 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:55.113 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:55.113 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:55.113 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:18:55.271 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:18:55.328 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:18:55.329 [info] beam_mcp: refused by host authorize/1: :nope -................ -21:18:55.435 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:18:55.487 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:55.539 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:55.539 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:55.539 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:55.599 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:55.657 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:18:55.658 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:18:55.665 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:55.666 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:18:55.669 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:55.669 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:18:56.668 [info] beam_mcp: refused by host authorize/1: :nope -. -21:18:56.672 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:18:57.379 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:18:57.382 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 74 ---- -Running ExUnit with seed: 519875, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:18:58.731 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -... -21:18:58.906 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........................ -21:18:59.017 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:59.018 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:18:59.022 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:18:59.023 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:59.023 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:59.024 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:18:59.076 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:18:59.128 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:18:59.128 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:18:59.247 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:18:59.249 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:18:59.300 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:18:59.352 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:18:59.352 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:59.353 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:18:59.353 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:18:59.405 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:18:59.462 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:19:00.439 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:19:00.442 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:01.202 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:01.911 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 75 ---- -Running ExUnit with seed: 360147, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:19:02.524 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -21:19:02.742 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:02.743 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:02.743 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:02.743 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:02.743 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:19:02.803 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:02.803 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:19:02.808 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:19:02.859 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:19:02.965 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:19:03.024 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:19:03.025 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:19:03.030 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:03.030 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:03.031 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:03.031 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:03.034 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:19:03.239 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:19:03.239 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............ -21:19:04.979 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:05.689 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:19:05.693 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:19:05.785 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 76 ---- -Running ExUnit with seed: 198406, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -....................................... -21:19:06.392 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:19:06.632 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:06.632 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:06.632 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:06.633 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:06.684 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:06.685 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:06.792 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:19:06.792 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:19:06.795 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:19:06.854 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:19:06.913 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:06.916 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:06.971 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:06.972 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:06.972 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -......... -21:19:07.024 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:19:07.083 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:07.083 [info] beam_mcp: refused by host authorize/1: :nope -...... -21:19:07.143 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:08.851 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:19:08.923 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:09.633 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:19:09.638 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 77 ---- -Running ExUnit with seed: 17139, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................... -21:19:10.206 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -21:19:10.396 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:10.396 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:10.412 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:19:10.474 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:10.475 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:19:10.629 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:19:10.687 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................... -21:19:10.849 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:10.850 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............. -21:19:10.858 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:10.858 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:10.858 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:10.859 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:19:10.916 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:10.917 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:19:10.969 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:10.969 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:10.976 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:10.978 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:11.913 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:19:13.342 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:19:13.420 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:13.425 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 78 ---- -Running ExUnit with seed: 813289, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -21:19:13.999 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:19:14.183 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:14.209 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:14.217 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:14.217 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:14.217 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:19:14.322 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:19:14.484 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:14.485 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:14.486 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:14.486 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:14.488 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:14.490 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:19:14.542 [info] beam_mcp: refused by host authorize/1: :nope -........... -21:19:14.595 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:14.595 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:19:14.700 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:19:14.700 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:14.701 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:19:14.706 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:19:15.753 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:19:16.471 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:16.474 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:19:17.258 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 79 ---- -Running ExUnit with seed: 654981, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:19:17.842 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............. -21:19:18.023 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:18.023 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:18.075 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:18.075 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:18.135 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:18.141 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................... -21:19:18.256 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:18.258 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:19:18.474 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:19:18.475 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:19:18.476 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:18.476 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:18.476 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:18.476 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:19:18.579 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:18.580 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -......... -21:19:18.581 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:19:18.587 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:18.587 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:19:19.557 [info] beam_mcp: refused by host authorize/1: :nope -... -21:19:20.326 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:21.037 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:19:21.044 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 80 ---- -Running ExUnit with seed: 492098, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:19:21.705 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:19:21.878 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:21.892 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:21.893 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:19:21.909 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:19:21.909 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........ -21:19:21.961 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:19:22.120 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:22.120 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:22.121 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:19:22.174 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:22.179 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:19:22.242 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:22.294 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -21:19:22.352 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:19:22.412 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:22.464 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:22.464 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:22.465 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:22.465 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:19:23.406 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:19:24.126 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:19:24.191 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:24.901 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 81 ---- -Running ExUnit with seed: 328041, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -21:19:25.539 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -......... -21:19:25.723 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:25.737 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:25.737 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:25.738 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:25.738 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:25.738 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:25.741 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:25.795 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -21:19:25.855 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:25.855 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:25.856 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:25.906 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:19:25.908 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:19:26.013 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:26.013 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:19:26.075 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:26.126 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:19:26.179 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -....... -21:19:26.237 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:19:27.944 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:19:28.659 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:19:28.663 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:19:28.739 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 82 ---- -Running ExUnit with seed: 151946, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................... -21:19:29.307 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................... -21:19:29.542 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:19:29.551 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:19:29.551 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:19:29.610 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:29.672 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:29.727 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:19:29.729 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:29.781 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:29.782 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:29.782 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:29.782 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:19:29.837 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:19:29.838 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:19:29.891 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:29.891 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:29.891 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:29.944 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:19:29.944 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:19:30.003 [info] beam_mcp: refused by host authorize/1: :nope -.................. -21:19:31.043 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:19:31.809 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:31.818 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:19:32.527 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 83 ---- -Running ExUnit with seed: 989183, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...................................... -21:19:33.165 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -................ -21:19:33.362 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:33.368 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:33.368 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................................. -21:19:33.642 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:33.643 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:33.650 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:33.653 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:33.653 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:33.654 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:33.654 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:33.654 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:33.706 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:19:33.707 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:19:33.707 [info] beam_mcp: refused by host authorize/1: :nope -....... -21:19:33.814 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:19:33.814 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:19:33.814 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:33.815 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:19:33.924 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:34.845 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -..... -21:19:35.574 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:35.577 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:19:35.633 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 84 ---- -Running ExUnit with seed: 787040, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -21:19:36.996 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......................... -21:19:37.160 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:19:37.269 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:19:37.271 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:37.440 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:37.444 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:37.444 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:37.499 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:19:37.551 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:19:37.552 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:19:37.607 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:37.607 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:37.608 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:37.608 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:37.608 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:37.608 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:19:37.613 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:37.618 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:37.618 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:19:37.618 [info] beam_mcp: refused by host authorize/1: :nope -............. -21:19:40.088 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:19:40.105 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:19:40.112 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:40.190 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 85 ---- -Running ExUnit with seed: 598412, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................. -21:19:40.736 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:19:40.954 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:19:41.022 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:19:41.074 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:41.076 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:19:41.077 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:41.081 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:41.133 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:41.133 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:41.133 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:19:41.195 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:41.195 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:19:41.297 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:19:41.351 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:41.352 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:41.352 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:19:41.358 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:41.359 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:19:41.468 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:41.468 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -21:19:42.510 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:19:42.518 [info] beam_mcp: refused by host authorize/1: :nope -... -21:19:43.935 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:19:44.006 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 86 ---- -Running ExUnit with seed: 422368, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:19:44.633 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -....... -21:19:44.905 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:44.905 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:19:45.070 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:45.070 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:45.070 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:45.071 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:45.071 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:19:45.126 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:19:45.130 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:45.131 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:19:45.184 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:19:45.190 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:45.191 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:19:45.242 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:45.293 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:19:45.346 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:19:45.353 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:45.355 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:19:45.355 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:19:47.072 [info] beam_mcp: refused by host authorize/1: :nope -... -21:19:47.786 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:19:47.790 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:47.794 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 87 ---- -Running ExUnit with seed: 238703, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................... -21:19:48.381 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:19:48.629 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:48.681 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:48.681 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:48.689 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:19:48.743 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:19:48.744 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:19:48.749 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:48.749 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:48.749 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:48.750 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:48.751 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:48.751 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:48.803 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:19:48.803 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:19:48.855 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.................. -21:19:48.958 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -........ -21:19:49.112 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:49.119 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:49.183 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:19:50.863 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:19:50.866 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:19:50.868 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:19:51.665 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 88 ---- -Running ExUnit with seed: 80625, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:19:52.223 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................... -21:19:52.458 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:52.458 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:52.458 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:52.467 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:19:52.526 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:19:52.527 [info] beam_mcp: refused by host authorize/1: :nope -......... -21:19:52.629 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:52.630 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:52.683 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:19:52.735 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:52.735 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:19:52.740 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...................... -21:19:52.858 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:52.859 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.... -21:19:52.962 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:52.962 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:52.963 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:19:52.966 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:19:53.022 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:19:53.990 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:19:54.049 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:54.053 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:19:54.057 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -..... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 89 ---- -Running ExUnit with seed: 942611, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -........................................ -21:19:56.123 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.................. -21:19:56.309 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:56.317 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:19:56.332 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:19:56.390 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:56.391 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -........ -21:19:56.495 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:19:56.496 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -................. -21:19:56.709 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................ -21:19:56.814 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:56.815 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:56.815 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:19:56.815 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:56.815 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:19:56.816 [info] beam_mcp: refused by host authorize/1: :nope -... -21:19:56.868 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:56.874 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:19:56.878 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:19:56.878 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:19:56.878 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:19:57.847 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.. -21:19:58.610 [info] beam_mcp: refused by host authorize/1: :nope -. -21:19:58.614 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:19:59.328 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 90 ---- -Running ExUnit with seed: 758480, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................................ -21:19:59.966 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.... -21:20:00.153 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:20:00.210 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:00.211 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:00.214 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:00.216 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:00.217 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:00.272 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -................ -21:20:00.382 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -............. -21:20:00.435 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:00.436 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:00.437 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:00.437 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................... -21:20:00.548 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:20:00.552 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:00.552 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:00.604 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:20:00.604 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:20:00.656 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:20:00.715 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:20:02.441 [info] beam_mcp: refused by host authorize/1: :nope -... -21:20:03.167 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:20:03.175 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:20:03.179 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 91 ---- -Running ExUnit with seed: 595114, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -21:20:03.800 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -............... -21:20:04.128 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:20:04.128 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:04.128 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:04.128 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:04.130 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:20:04.183 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -......... -21:20:04.236 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:20:04.290 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:04.292 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:04.292 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:04.292 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............. -21:20:04.347 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:20:04.399 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:20:04.400 [info] beam_mcp: refused by host authorize/1: :nope -... -21:20:04.457 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:04.460 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:04.514 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:20:04.520 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:04.523 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:20:05.534 [info] beam_mcp: refused by host authorize/1: :nope -... -21:20:05.545 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:20:05.548 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:20:06.256 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 92 ---- -Running ExUnit with seed: 471068, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................... -21:20:07.677 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -21:20:07.849 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:07.859 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -........... -21:20:07.923 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:20:07.927 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:20:08.090 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:08.094 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:08.146 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:08.146 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:20:08.200 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:08.200 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:20:08.207 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:08.207 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:20:08.260 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:08.260 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:08.261 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:08.261 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -21:20:08.314 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:08.314 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:20:08.315 [info] beam_mcp: refused by host authorize/1: :nope -.............. -21:20:09.461 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:20:10.899 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:20:10.906 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:20:10.910 [info] beam_mcp: refused by host authorize/1: :nope -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 93 ---- -Running ExUnit with seed: 352246, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................. -21:20:11.497 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -21:20:11.789 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:20:11.894 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:11.947 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:20:12.004 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:12.004 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:12.059 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:20:12.060 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:12.060 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:12.060 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:20:12.067 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:20:12.119 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:12.172 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:20:12.173 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:12.173 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:12.173 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:12.180 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:20:12.180 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.. -21:20:12.238 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:12.238 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -................... -21:20:13.334 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:20:14.045 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:20:14.058 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.... -21:20:14.773 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 94 ---- -Running ExUnit with seed: 156412, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................. -21:20:15.359 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:20:15.553 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.................. -21:20:15.608 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:15.608 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:15.608 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:15.608 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:20:15.710 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -...... -21:20:15.768 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:15.768 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:15.768 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.................. -21:20:15.877 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:15.884 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:15.884 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -..... -21:20:15.936 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:15.938 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:15.994 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:20:16.053 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:16.053 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:16.053 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:16.053 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -................. -21:20:17.799 [info] beam_mcp: refused by host authorize/1: :nope -. -21:20:17.802 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:20:17.859 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:20:17.867 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 95 ---- -Running ExUnit with seed: 5794, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -................................... -21:20:19.160 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........................... -21:20:19.438 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:19.445 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:20:19.498 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:19.498 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:19.498 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -21:20:19.506 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:19.507 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -21:20:19.508 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:20:19.508 [info] beam_mcp: refused by host authorize/1: :nope -. -21:20:19.560 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:19.560 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:19.614 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:19.723 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:20:19.781 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -.......... -21:20:19.886 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:19.937 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:19.943 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:20:19.944 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:19.944 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............ -21:20:21.674 [info] beam_mcp: refused by host authorize/1: :nope -... -21:20:22.389 [info] beam_mcp: refused by host authorize/1: :nope -. -21:20:22.393 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:20:22.397 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 96 ---- -Running ExUnit with seed: 826020, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.............................................. -21:20:23.019 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -21:20:23.202 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:20:23.271 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:23.271 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -21:20:23.324 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:23.324 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:23.377 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:23.377 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:23.377 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:23.377 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:20:23.441 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:23.444 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -21:20:23.447 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.............. -21:20:23.499 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.. -21:20:23.500 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:23.500 [info] beam_mcp: refused by host authorize/1: :nope -..... -21:20:23.552 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:20:23.711 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:23.718 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:23.770 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -............ -21:20:26.233 [info] beam_mcp: refused by host authorize/1: :nope - - - 1) test a live listener: what a refusal does to the connection a refusal over the adapter's drain cap now announces the close it always did (BeamMCP.Transport.HTTPBanditTest) - test/beam_mcp/transport/http_bandit_test.exs:300 - Expected truthy, got false - code: assert String.contains?(bytes, "HTTP/1.1 403") - arguments: - - # 1 - "" - - # 2 - "HTTP/1.1 403" - - stacktrace: - test/beam_mcp/transport/http_bandit_test.exs:315: (test) - - -21:20:26.241 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -21:20:26.262 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:20:26.265 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.4 seconds (0.9s async, 2.5s sync) -160 tests, 1 failure -RUN_EXIT=2 ----- run 97 ---- -Running ExUnit with seed: 650590, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.................................................. -21:20:26.860 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -...... -21:20:27.137 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -... -21:20:27.138 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -. -21:20:27.142 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:20:27.252 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:27.258 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:27.258 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:27.258 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:27.363 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:27.363 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:20:27.415 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:27.416 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:20:27.417 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -21:20:27.422 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:27.422 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:27.422 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:27.423 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:27.423 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -. -21:20:27.423 [info] beam_mcp: refused by host authorize/1: :nope -....................... -21:20:27.543 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:20:28.566 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:20:28.634 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:20:28.641 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -... -21:20:30.059 [info] beam_mcp: refused by host authorize/1: :nope -.. -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 98 ---- -Running ExUnit with seed: 512152, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -............................................ -21:20:30.679 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -........... -21:20:30.919 [info] beam_mcp: refused by host authorize/1: :nope -............ -21:20:30.987 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:30.987 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:30.987 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:20:31.098 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:20:31.204 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:20:31.207 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:31.208 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -..... -21:20:31.212 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:31.272 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:31.273 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:31.273 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:20:31.326 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -....... -21:20:31.380 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -21:20:31.433 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.... -21:20:31.433 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:31.434 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:31.434 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:31.434 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:20:32.411 [info] beam_mcp: refused by host authorize/1: :nope -. -21:20:32.416 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -. -21:20:32.419 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:20:33.910 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 3.3 seconds (0.8s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 99 ---- -Running ExUnit with seed: 347331, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.......................................... -21:20:34.535 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.......... -21:20:34.722 [info] beam_mcp: refused by host authorize/1: :nope -.... -21:20:34.777 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:34.779 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -21:20:34.836 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -21:20:34.839 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:34.846 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -21:20:34.965 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -21:20:35.069 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:20:35.070 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:35.070 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:35.071 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:20:35.072 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -... -21:20:35.072 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........... -21:20:35.282 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:35.283 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:35.283 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:35.289 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:35.290 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:35.290 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:20:36.261 [info] beam_mcp: refused by host authorize/1: :nope -. -21:20:36.267 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -.... -21:20:37.034 [info] beam_mcp: refused by host authorize/1: :nope -. -21:20:37.039 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -... -Finished in 3.3 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 ----- run 100 ---- -Running ExUnit with seed: 205821, max_cases: 8 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -..................................... -21:20:38.349 [error] beam_mcp: tool "echo" cannot be called: x-mcp-header MUST only be applied to parameters with primitive types (integer, string, boolean), and ratio is "number" and carries x-mcp-header "Ratio". Every call to this tool is refused until the schema is corrected. -.............. -21:20:38.588 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:38.589 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:38.589 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -21:20:38.656 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -.... -21:20:38.662 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:720: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............. -21:20:38.668 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1077: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:38.669 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:38.669 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -...... -21:20:38.727 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..................... -21:20:38.991 [info] beam_mcp: refused by host authorize/1: :nope -.. -21:20:39.044 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -....... -21:20:39.096 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -... -21:20:39.148 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -21:20:39.150 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -21:20:39.150 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -21:20:39.150 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:39.156 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:719: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:669: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:611: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:572: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:221: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -21:20:39.162 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1047: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:965: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -21:20:39.162 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -............... -21:20:40.863 [error] ** (RuntimeError) authorize exploded - test/beam_mcp/transport/http_bandit_test.exs:264: anonymous fn/1 in BeamMCP.Transport.HTTPBanditTest."test a live listener: what a refusal does to the connection an authorize that raises ends the connection instead of draining the body"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1020: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:358: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:277: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:219: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:185: BeamMCP.Transport.HTTP.call/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:129: Bandit.Pipeline.call_plug!/2 - (bandit 1.12.5) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5 - (bandit 1.12.5) lib/bandit/http1/handler.ex:23: Bandit.HTTP1.Handler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3 - (bandit 1.12.5) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2 - (stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3 - (stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4 - (stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3 - -.. -21:20:40.870 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: :yes_please -. -21:20:40.873 [info] beam_mcp: refused by host authorize/1: :nope -. -21:20:40.927 [info] beam_mcp: refused by host authorize/1: :nope -.... -Finished in 3.4 seconds (0.9s async, 2.4s sync) -160 tests, 0 failures -RUN_EXIT=0 - -== red-rate-mc8-idle: 2 run(s) of 100 exited non-zero == diff --git a/slices/006-harness-honesty/logs/round1.h.md b/slices/006-harness-honesty/logs/round1.h.md deleted file mode 100644 index 8f1ff697..00000000 --- a/slices/006-harness-honesty/logs/round1.h.md +++ /dev/null @@ -1,405 +0,0 @@ - - -# Slice 006, round 1 — lane `h`: the record and the instrument - -**Tree read:** `e2f8a0898362319a3aeb44a5a89e090d546858ff` -**HEAD at read time:** `90e4e99f8bda256fc7c5a526e4fc2b3bd8ef6d25` — *"Correct the test count this slice -made false, and two paths that resolve nowhere"*. -**Commits read:** `6050eff`, `4a10c0d`, `24370ce`, `90e4e99`. - -**Scope.** Not the mechanism (lane `m` has that). Every number in `FINDINGS.md` and in the four -commit messages checked against the archive it cites, with a command; whether `tools/mutate.sh` is -re-runnable by someone holding only this repository; whether the gate's REUSE step can see the new -`tools/` files; whether the archives are whole command output; whether anything claims more than it -measured; and whether PLAN §4 is discharged. - -**Verdict: changes required.** - -Four blocking findings. None of them is in the fix — the mechanism work stands up to every check I -could make of it from the record's side, and eleven of the fourteen archives reconcile exactly. All -four are in the record, which is where this repository's history says the failure lands. - ---- - -## Blocking - -### H-1. The anchor table reports a suite run that never happened - -`FINDINGS.md` §"The two new anchors, and they move" prints, citing -`logs/mutation-harness-anchors.txt`: - - H1 ... 162 tests, 2 failures TEST_EXIT=2 - H2 ... 162 tests, 1 failure TEST_EXIT=2 - unmutated 162 tests, 0 failures - -The archive it cites says something else. Quoted from the file: - - $ sed -n '17p;57,58p;73p;105,106p;108p;110p' slices/006-harness-honesty/logs/mutation-harness-anchors.txt - --- H1: mix test test/beam_mcp/transport/http_bandit_test.exs --- - 11 tests, 2 failures - TEST_EXIT=2 - --- H2: mix test test/beam_mcp/transport/http_bandit_test.exs --- - 11 tests, 1 failure - TEST_EXIT=2 - restored; unmutated: - 11 tests, 0 failures - -The anchors were mutated against **one file, 11 tests**. The table promotes that to **162 tests**, -the whole-suite number, three times. The failure counts (2, 1, 0) and the exits are right; the -population is not. Three counts typed rather than quoted, in the table whose entire job is to show -that the two new anchors carry information — and in a slice whose thesis is that "160 tests, 1 -failure" reading identically to something else is how a false record gets written. - -The 162-vs-160 arithmetic itself is sound and independently supported (`git show 6050eff -- test/…` -adds exactly 2 `test "` lines and removes 0; `logs/green-rate-mc8-idle.txt` ends `162 tests, 0 -failures`). It is the anchor rows that misdescribe their run. - -**Clears it:** re-quote the three rows as `11 tests` and name the command -(`mix test test/beam_mcp/transport/http_bandit_test.exs`), or re-run the two mutations over the -whole suite and archive that. - -### H-2. The commit that swept unresolvable log paths out of this file left five in it - -`90e4e99` fixes two bare `logs/probe-d-bandit-drain*.txt` citations in -`test/beam_mcp/transport/http_bandit_test.exs`, reasoning: *"A citation that cannot be followed is -not a citation."* Both fixed references were slice 003's, written before this slice. Every citation -**this slice added to the same file** was missed: - - $ for p in $(grep -oE '(slices/[A-Za-z0-9./-]+|logs/[A-Za-z0-9./-]+)\.txt' \ - test/beam_mcp/transport/http_bandit_test.exs | sort -u); do - [ -e "$p" ] && echo "EXISTS $p" || echo "MISSING $p"; done - MISSING logs/green-mutation-under-load.txt - MISSING logs/probe-drain-mechanism.txt - MISSING logs/probe-loss-site.txt - MISSING logs/probe-rate-mc8-load32-passive.txt - MISSING logs/probe-write-shape.txt - EXISTS slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt - EXISTS slices/003-release-0-3-1/logs/probe-d-bandit-drain.txt - -Lines 118, 136, 156, 166 and 179. Same file, same class, same sweep, five instances to two — and -the two that were found are the two that pre-dated the slice. This is CONVENTIONS.md's *"a grep -finds what you already thought of"* happening inside the commit that names the class. - -**Clears it:** prefix all five with `slices/006-harness-honesty/`, and say in the record how the set -was derived (the `grep -oE … | while read; do [ -e ]` above is a derivation, a re-read of the -moduledoc is not). - -### H-3. The CI table — the premise of the whole slice — has no archive - -`FINDINGS.md` §"In CI, on commits containing no code": - - run 34174975336 PR #15 seed 70815 160 tests, 1 failure - run 34175931068 PR #17 seed 11394 160 tests, 1 failure - -plus *"Two failures in the fifteen most recent push runs; `main` has three green runs in that -window"*, and *"Both commits' `pull_request` runs of the **same commit** passed."* - -Nothing fetched any of it. - - $ grep -rln '34174975336\|34175931068' . | grep -v '^./.git' - slices/006-harness-honesty/FINDINGS.md - slices/006-harness-honesty/logs/round1.h.md # this file - -No `logs/ci-*.txt`, no `gh run view` transcript, no command named beside the numbers, and the -paragraph opens the section that the FINDINGS header promises is quoted-with-its-archive. Six -counts, two run ids, two seeds and a claim about the fifteen most recent push runs, all typed. This -is the exact shape CONVENTIONS.md legislates against — *"a verbatim archive is written by a command -that fetches it, or it does not exist"* — applied to the one measurement that establishes the defect -reached CI, which is the sentence PLAN §0 uses to justify running 006 ahead of 005. - -The 100-run local rates beside it are archived properly and reconcile exactly (see below), which -makes the gap sharper rather than softer: the numbers that were cheap to fetch were fetched. - -**Clears it:** `gh run view --log` and `gh run list` into `logs/`, cited; or, if the runs are -not to be touched, restate the paragraph as an unarchived citation of where the runs live and stop -printing per-run counts as if quoted. - -### H-4. PLAN §4 criteria 4 and 6 are neither discharged nor recorded as undischarged - -- **Criterion 4** — *"Demonstrated at CI's `max_cases: 8`, **in CI**, not only locally"* — is not - discharged. FINDINGS gestures at it once (*"what closes the question is the CI run at the end of - this slice, not this paragraph"*), but that sentence is inside the rate-disagreement argument, and - the section explicitly titled **"What is NOT done here"** lists three items, none of them this. - A reader auditing the acceptance criteria against the record finds criterion 4 neither done nor - declared outstanding. -- **Criterion 6** — *"Gate green, and green repeatedly"* — is discharged in the tree and absent from - the record. `logs/gate-round1.txt` holds five consecutive `Gate OK. GATE_EXIT=0` runs with every - step line reading `pass`, and `logs/red-gate-credo-nesting.txt` holds the red that preceded it - (`credo FAIL (exit 8)`, nesting depth 3 at `http_bandit_test.exs:351`). **These are the only two - logs in the slice that FINDINGS.md never cites:** - - $ for f in slices/006-harness-honesty/logs/*.txt; do b=$(basename $f); - grep -q "$b" slices/006-harness-honesty/FINDINGS.md || echo "UNCITED $b"; done - UNCITED gate-round1.txt - UNCITED red-gate-credo-nesting.txt - - Two orphan archives and an undischarged criterion are the same defect from two sides. - -**Clears it:** a short gate section in FINDINGS citing both logs and quoting the reuse line, and -criterion 4 added to "What is NOT done here" until a CI run exists. - ---- - -## Non-blocking - -### h-5. Two logs carry a different run's banner than their filename - - $ head -1 slices/006-harness-honesty/logs/probe-rate-mc8-load32-passive.txt - == probe-rate-mc8-load32-fixed == - $ head -1 slices/006-harness-honesty/logs/probe-rate-mc8-load32-active.txt - == green-rate-mc8-load32 == - $ head -1 slices/006-harness-honesty/logs/green-rate-mc8-load32.txt - == green-rate-mc8-load32 == - -Two different files claim the banner `green-rate-mc8-load32`, and one of them is a rejected draft: - - $ tail -1 slices/006-harness-honesty/logs/probe-rate-mc8-load32-active.txt - == green-rate-mc8-load32: 3 run(s) of 40 exited non-zero == - -A reader grepping the archive for the green loaded run finds a log headed "green" that ends in -three failures. The filenames are right and FINDINGS cites them correctly; the bytes inside are a -rename that did not reach the header. Add a correction line to each (appended, per CONVENTIONS, -not rewritten) saying which run it is. - -### h-6. Three archives cite an instrument nobody can re-run — the defect this slice moved `mut.sh` for - - $ git grep -n '/tmp/claude' -- slices/006-harness-honesty/ - logs/mutation-harness-anchors.txt:6: --- /tmp/claude-…/scratchpad/006/fixed_bandit_test.exs - logs/mutation-harness-anchors.txt:62: --- /tmp/claude-…/scratchpad/006/fixed_bandit_test.exs - logs/probe-loss-site.txt:3: $ env N=60 MIX_ENV=test mix run /tmp/claude-…/scratchpad/006/loss_site.exs - logs/probe-write-shape.txt:3: $ env N=120 MIX_ENV=test mix run /tmp/claude-…/scratchpad/006/write_shape.exs - -`4a10c0d`'s own argument: *"`$S/mut.sh ` where `$S` is a scratchpad directory on one machine. -Nobody reading that record can re-run it, which makes the table a claim rather than a measurement."* -`logs/probe-loss-site.txt` is the archive behind *"the server decided and wrote its refusal 60 times -out of 60"* and the ~5% loss that `@attempts 5` is derived from — load-bearing, and its script is -gone with the session. - -The slice already contains the fix: `logs/probe-drain-mechanism.txt` opens with -`---- the probe script, verbatim ----` and embeds the whole thing. Do the same for the other two, -and for the anchor mutations name the tracked file rather than the scratchpad copy. - -### h-7. "Rules the write shape out" is not what that archive says - -FINDINGS: *"`logs/probe-write-shape.txt` rules the write shape out as the governor: on the same -loaded machine, 120 runs in one 9 MB send lost 0 and 120 runs in 64 KB chunks lost 5."* Both numbers -are exactly right — - - $ grep -nE '^== |MISSING in' slices/006-harness-honesty/logs/probe-write-shape.txt - 246:== one_send: 120 runs of the 9 MB refusal, active-mode client == - 249: response MISSING in 0/120 - 491:== chunked: 120 runs of the 9 MB refusal, active-mode client == - 495: response MISSING in 5/120 - -— and the conclusion drawn from them is the opposite of what they show. 0/120 against 5/120 is the -write shape mattering, not the write shape being ruled out. What the probe supports is narrower: -*loss is not confined to chunked writes at a rate that explains the suite*, or something the data -actually carries. The same paragraph in `6050eff`'s message reads *"The write shape does not govern -it either"*, so the overstatement is in two places. - -Related and smaller: the comment at `http_bandit_test.exs:154` says `active: true` *"took the loss -from 11/40 to 3/60"*. 11/40 is variant A of `probe-drain-mechanism.txt`, whose header records no -background load; 3/60 is `probe-loss-site.txt` under 32 busy loops. The like-for-like pair does -exist (6/40 passive-loaded vs 3/60 active-loaded) and is quoted correctly two lines above; the -11/40→3/60 sentence crosses load profiles. - -### h-8. `logs/gate-round1.txt` is headed "on the tree that ships" and is two commits behind it - - $ head -4 slices/006-harness-honesty/logs/gate-round1.txt - == the gate, 5 times, on the tree that ships == - date: 2026-09-08T02:37:06Z - HEAD: a02e5603e6a26ff91af775a0b4cd1d88943c707b - staged, so tools/ and the mutants are in git ls-files and therefore in the REUSE step's population - -`a02e560` is the slice's **base**; the runs measured staged work. `24370ce` and `90e4e99` landed -afterwards, and `90e4e99` edited `test/beam_mcp/transport/http_bandit_test.exs`. `90e4e99`'s message -quotes `Gate OK. GATE_EXIT=0` with no archive at all. The repository already has a commit named -*"re-score on the tree that ships"*; this is the same gap one step later. (I re-ran the gate myself -on the current tree — see below — and the reuse line is `pass` on it once my probe is restored, so -this is a record gap and not a broken gate.) - -### h-9. `mutate.sh`'s restore claim is absolute, and there is no lock - -The header says *"an interrupted run cannot leave a mutated file behind."* Measured, three -invocations of `./tools/mutate.sh run Md1` interrupted once the target's sha256 had changed: - - SIG=TERM mutated_before_signal=yes wait_rc=0 restored=YES git status -- lib/: '' - SIG=INT mutated_before_signal=yes wait_rc=0 restored=YES git status -- lib/: '' - SIG=KILL mutated_before_signal=yes wait_rc=137 restored=NO git status -- lib/: ' M lib/beam_mcp/transport/http.ex' - -The trap holds for `INT` and `TERM`, which is what it traps. `KILL` — and a crash, and a power cut — -leaves the mutant on disk. (I restored it with `git checkout -- lib/beam_mcp/transport/http.ex`; -proof of restore below.) Say "an interrupted run" or say "a run that is not `SIGKILL`ed", not -"cannot". - -Second, from reading `start()`/`restore()`: the pristine is a copy of **whatever is on disk when the -invocation starts**, with no lock. Two invocations in one worktree, B starting while A has a mutant -applied, gives B a mutated pristine; if A exits first, B's EXIT trap writes the mutant back and -prints `restored: … is the file you started with`, which is true and misleading. This is not -hypothetical here: lane `m` was running `mutate.sh` in this same worktree during my read, and I -observed `lib/beam_mcp/transport/http.ex` mutated between two of my own commands. A lockfile, or a -refusal when `git status --porcelain -- "$TARGET"` is non-empty at `start`, closes it. - ---- - -## What I ran, and what reconciled - -Every count below is from the command shown; `EXIT` is the command's exit code. - -**Rate archives — all four reconcile exactly.** - - $ grep -o 'RUN_EXIT=[0-9]*' | sort | uniq -c / grep -c '^---- run ' - red-rate-mc8-idle 100 runs 98 x 0, 2 x 2 FINDINGS: 2 of 100 OK - red-rate-mc64-idle 100 runs 99 x 0, 1 x 2 FINDINGS: 1 of 100 OK - green-rate-mc8-idle 100 runs 100 x 0 FINDINGS: 0 of 100 OK - green-rate-mc64-idle 100 runs 100 x 0 FINDINGS: 0 of 100 OK - green-rate-mc8-load32 40 runs 40 x 0 FINDINGS: 0 of 40 OK - probe-rate-mc8-load32-passive 40 runs 34 x 0, 6 x 2 FINDINGS: 6 of 40 OK - probe-rate-mc8-load32-active 40 runs 37 x 0, 3 x 2 FINDINGS: 3 of 40 OK - -**The repeat distribution, which is the claim I most expected to be typed, is exact.** - - $ awk '/^---- run /{if(s)print c; s=1; c=0} /produced no measurement/{c++} END{if(s)print c}' \ - logs/green-rate-mc8-load32.txt | sort -n | uniq -c - 36 4 - 3 5 - 1 7 - $ grep -c 'produced no measurement' logs/green-rate-mc8-load32.txt - 166 - -FINDINGS' 36/3/1 table is right, and its *"six exchanges in forty loaded suites produced no -measurement and were repeated"* is 166 − (40 × 4) = 6, from the log. EXIT=0. - -**Both mutation tables reconcile row by row** against `logs/red-mutation-under-load.txt` and -`logs/green-mutation-under-load.txt` (`M2never 1|1|1|0`, `Mc2 0|0|0|0`, `M13rev 1|2|2|2`, -`M2always 1|2|2|1`, `Mc3 2|2|3|3`, `Md1 9|9|9|9`, `Md2 2|3|3|3`, `Me1 1|1|1|1`, `Mr1 4|4|5|5`, -`Mr2 3|4|3|3` before; every row constant after). I recomputed the headline claim rather than -trusting it: summing, per mutant, the passes reading above slice 003's recorded value gives -3+2+3+0+2+0+3+0+2+1 = **16 of 40**, which is what FINDINGS and `24370ce` both say. The "after" rows -equal slice 003's recorded table at `FINDINGS.md:165-173` of `slices/003-release-0-3-1` for the nine -mutants it lists, and `Me1`'s 1 matches `slices/003-release-0-3-1/logs/mutation-rebased.txt:31`. - -**`Md1` kills seven of nine.** The green log lists 7 `HTTPBanditTest` failures under `Md1`; the -describe block has 9 tests: - - $ awk '/describe "a live listener/{f=1} f&&/^ describe /&&!/a live listener/{f=0} f&&/^ test "/{c++} END{print c}' \ - test/beam_mcp/transport/http_bandit_test.exs - 9 - -**The probe tallies** in `probe-drain-mechanism.txt` (A 29/11, B 21/11/8, C 40, D 25/15) and -`probe-loss-site.txt` (57x/3x of 60) match FINDINGS and `6050eff` exactly, including the abbreviated -form in the commit message. `probe-drain-mechanism.txt` embeds its script verbatim and ends -`PROBE_DONE / PROBE_EXIT=0`; all fourteen archives end in a terminator line and none shows a -truncation or an editing seam. - -**162 vs 160.** - - $ git show 6050eff -- test/beam_mcp/transport/http_bandit_test.exs | grep -cE '^\+ *test "' - 2 - $ ... | grep -cE '^\- *test "' - 0 - $ grep -n '162' HANDOFF.md - 30:- **162 tests, 0 failures.** Was 160 before slice 006's two anchors, … - -Two tests added, none removed; HANDOFF corrected. The claim is true. Only the anchor table's -rendering of it (H-1) is wrong. - -**Slice 003 was not rewritten.** - - $ git diff a02e560 --stat -- slices/003-release-0-3-1 - (no output) - $ git diff a02e560 --name-only -- slices/003-release-0-3-1 | wc -l - 0 - EXIT=0 - -**The rate disagreement (2 in 100 local vs 2 in 15 in CI) is reported honestly** and nothing -downstream quietly folds them into one defect: the FINDINGS paragraph says *"it is not evidence of -two different defects, and it is not evidence of one either"*, `24370ce` repeats it, and no count -anywhere in the slice is derived from combining the two. `@attempts 5` is derived from the **local** -loss measurement (`5% at its worst leaves 3e-7`), not from CI. The one thing missing is the archive -for the CI half — which is H-3, and it is a missing archive rather than a smoothed number. - -**The instrument, re-run from this repository only.** - - $ ./tools/mutate.sh list EXIT=0 (10 mutants) - $ ./tools/mutate.sh check EXIT=0 - M13rev applied (11 changed line(s)) … Mr2 applied (2 changed line(s)) - restored: lib/beam_mcp/transport/http.ex is the file you started with - $ sha256sum lib/beam_mcp/transport/http.ex before and after - d7795a126a484ad8b9aa79541686fd0857a6ab773e666fcca0fa170551dda4f2 (identical) - $ ./tools/mutate.sh run Mr2 163 tests, 3 failures TEST_EXIT=2 - -All ten mutants apply and restore. `Mr2`'s 3 failures independently reproduce slice 003's recorded -row on a machine that is not the one that wrote the log — which is the point of committing the -harness, and it works. (163 rather than 162 because lane `m`'s uncommitted `TEMP-PROBE` test was in -the worktree at that moment; it has since been removed by lane `m` and the suite is 162 again.) -`git status --porcelain` after each shows no `lib/` entry. No absolute path, `$S`, or scratchpad -reference exists anywhere in `tools/`: - - $ git grep -nE '/home/|/tmp/claude|\$S/' -- tools/ - (only the ten mutant comments and mutate.sh's header, all of which *describe* the removed - `$S/mut.sh` rather than depending on it) - -**The REUSE step can see the new files — proven, not assumed.** Population derived the way -`tools/gate.sh` derives it (`git ls-files`, minus `slices/*/logs/*` and `LICENSES/*`): - - $ git ls-files | wc -l 261 - $ git ls-files | grep -c '^slices/[^/]*/logs/' 188 - $ git ls-files tools/ | wc -l 20 (11 new this slice) - all 20 headered by `head -5 … | grep SPDX-License-Identifier` - -Then the probe. `tools/mutants/Mr2.py` had its `SPDX-License-Identifier` line removed and the gate -was run whole: - - $ ./tools/gate.sh - format pass / compile pass / test pass / credo pass / optional deps pass / docs pass - reuse FAIL (261 tracked; 71 in scope, 68 headered + 2 sidecar; - excluded 188 archive + 2 licence text) - no SPDX-License-Identifier in the file or in a .license sidecar: - tools/mutants/Mr2.py - licence files pass - GATE FAILED. - -The step **names the file** and the headered count drops 69 → 68 against `logs/gate-round1.txt`'s -`69 headered`. This is CONVENTIONS.md's first named instance answered properly: the probe was -planted in a tracked file, so `git ls-files` could see it. - -**Restored, and proven restored.** - - $ cp tools/mutants/Mr2.py - $ sha256sum tools/mutants/Mr2.py - 60c3fc1e2e5bfc2b2b4c237ee59a78d525af807d657ce26239bfb11c95e7a52d (= the pre-probe hash) - $ git diff --stat HEAD -- tools/ (no output) EXIT=0 - $ git status --porcelain - ?? slices/006-harness-honesty/logs/round1.h.md - ?? slices/006-harness-honesty/logs/round1.h.tree - ?? slices/006-harness-honesty/logs/round1.m.md - ?? slices/006-harness-honesty/logs/round1.m.tree - -The only paths this lane leaves behind are its own two deliverables. The `lib/` mutant left by the -`SIGKILL` test (h-9) was restored with `git checkout -- lib/beam_mcp/transport/http.ex` and is -absent from the status above. - ---- - -## What I did not check - -- **The CI runs themselves.** I did not call `gh`, did not reach the network, and cannot say whether - runs `34174975336` and `34175931068` exist, failed, or carried those seeds. H-3 is that the record - contains no archive, not that the numbers are wrong. -- **The 100-run rates were not re-measured.** I verified that each archive's own tally matches what - FINDINGS says about it, not that a fresh 100 runs would agree. -- **Byte-identity of the scratchpad `fixed_bandit_test.exs`** that `mutation-harness-anchors.txt` - diffs against, versus the committed file. It is unreachable (h-6), so the anchor diffs cannot be - confirmed to have been taken against the shipping bytes — and `90e4e99` edited that file after the - anchor log was written. -- **Whether the archives are byte-for-byte what the commands emitted.** I checked structure — - headers naming a command, per-run delimiters, terminator lines, internally consistent tallies, no - seams — which is evidence of wholeness, not proof of it. -- **The mechanism.** Lane `m`'s scope. I read `collect/3`, `settle/2` and the repeat only far enough - to check that the record describes them accurately, which it does. -- The worktree was not clean while I read it: lane `m`'s uncommitted probe and `mutate.sh` runs were - live in it throughout. Nothing above depends on the working tree, only on `HEAD` and the archives. diff --git a/slices/006-harness-honesty/logs/round1.h.tree b/slices/006-harness-honesty/logs/round1.h.tree deleted file mode 100644 index 878408e3..00000000 --- a/slices/006-harness-honesty/logs/round1.h.tree +++ /dev/null @@ -1,11 +0,0 @@ -e2f8a0898362319a3aeb44a5a89e090d546858ff -# tree of commit 90e4e99, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 1 LANE h READ. HEAD at read time: -# 90e4e99f8bda256fc7c5a526e4fc2b3bd8ef6d25 -- "Correct the test count this slice made -# false, and two paths that resolve nowhere", the fourth and last commit of slice 006. -# The four commits read: 6050eff, 4a10c0d, 24370ce, 90e4e99. -# The working tree was NOT clean while this review ran: lane m's uncommitted -# TEMP-PROBE test and its mutate.sh runs were live in the same worktree. Nothing in -# this lane's findings depends on those; the deliberate probes this lane applied -# (tools/mutants/Mr2.py header removal, mutate.sh interrupt runs) were restored and -# the restores are proven in round1.h.md. diff --git a/slices/006-harness-honesty/logs/round1.m.md b/slices/006-harness-honesty/logs/round1.m.md deleted file mode 100644 index c7c8631c..00000000 --- a/slices/006-harness-honesty/logs/round1.m.md +++ /dev/null @@ -1,254 +0,0 @@ - - -# Slice 006, round 1, lane m — the mechanism - -**Tree:** `e2f8a0898362319a3aeb44a5a89e090d546858ff` -**Commit:** `90e4e99f8bda256fc7c5a526e4fc2b3bd8ef6d25` (branch `slice/006-harness-honesty`) - -**Scope.** The mechanism only: is the diagnosis right, is the replacement a replacement rather -than a retune, is the repeat honest, can the new read logic still fail when what it pins is -removed, is any existing assertion made vacuous, and is `lib/` untouched. Not the prose — lane -`h` has the record. Everything below names its command and its exit code; every count is quoted -from output. - ---- - -# **Verdict: changes required** - -Two blocking findings, both cheap to clear. The diagnosis is right, the replacement is a genuine -replacement of the failing branch, and the mutation table reproduces — but the **repeat is not -anchored at all**, and I turned an 80%-broken server into a clean pass through it. - ---- - -## What I ran - -| # | command | result | -|---|---|---| -| 1 | `git diff a02e560 --stat -- lib/` | **no output**, exit 0 | -| 2 | `mix test` (unmutated) | `162 tests, 0 failures` `TEST_EXIT=0` | -| 3 | `tools/mutate.sh check` | 10/10 `applied`, `restored: lib/beam_mcp/transport/http.ex is the file you started with` | -| 4 | `PASSES=1 tools/mutate.sh score Mc2 Mc3 M2never Md1` | see §3 | -| 5 | H3 — a mutation the archive does not use | `162 tests, 3 failures` `TEST_EXIT=2` | -| 6 | H4 — `@attempts 5` -> `2` | `11 tests, 0 failures` `TEST_EXIT=0` | -| 7 | H5 — `@attempts 5` -> `1` | `162 tests, 0 failures` `TEST_EXIT=0` | -| 8 | temporary probe test (§4) | `12 tests, 0 failures` `TEST_EXIT=0` | - -`git status --porcelain` after every mutation and after the score run listed **only** this round's -four untracked `logs/round1.*` files — no tracked file modified. The pristine test file was taken -before the first mutation and restored by `cp` each time. - ---- - -## 1. The diagnosis is right, and the PLAN's hypothesis really is refuted - -The old code (`git show 6050eff~1:test/beam_mcp/transport/http_bandit_test.exs`) is what FINDINGS -says it is: - - {:error, :timeout} -> {acc, :open} - {:error, :closed} -> {acc, :closed} - -with `@first_byte_ms 10_000` guarding the first byte. The PLAN predicted a **partial** buffer via -the `:timeout` limb. Checked against the archives: - -- `grep -c timeout logs/red-rate-mc8-idle.txt logs/red-rate-mc64-idle.txt` -> **`0` and `0`**. The - timeout limb is not in either red transcript. It cannot have produced those failures. -- `grep -n -A4 'arguments:' logs/red-rate-mc8-idle.txt` -> two hits (lines 6787, 24102), each - `# 1` followed by `""`. Two failures, both on an **empty** buffer, matching "2 of 100". -- `logs/probe-drain-mechanism.txt:225` -> `11x {0, :closed, :ok, false}`. Zero bytes read, reason - `:closed`, server's 403 gone. - -Empty buffer, `:closed` limb, no timeout. **The refutation holds and it is properly evidenced.** -This also correctly explains why slice 003's `700 -> 10_000 + 700` split lowered the rate without -removing the mechanism. - -## 2. The replacement is a replacement — with one honest exception, disclosed - -No timing constant was raised: `@hold_ms` is still `700`, `@read_ms` is still `10_000`, and -`@connect_ms 5_000` is the old inline literal given a name. The two new constants are `@write_ms -15_000` (a join on the writer process; on expiry it falls through to `:ok` and decides nothing) -and `@attempts 5`. `@read_ms` genuinely no longer answers — it `raise`s. - -**`settle/2` still answers `:open` on a timeout, so the brief's "no timeout may decide a verdict" -is not literally satisfied.** The stated argument is *sound as far as ordering goes*: `settle/2` -is unreachable until `complete_responses(acc) >= expect`, TCP delivers FIN behind the bytes that -preceded it, and the `inet` driver posts `{:tcp_closed, _}` / `{:tcp_error, _, _}` into a FIFO -mailbox after the `{:tcp, _, data}` it already posted. So the 700 ms window cannot cut a response -in half any more, and it cannot verdict an empty buffer. - -What it still races is the **server's own `close/1` syscall**, and that gap is unbounded under CPU -starvation. If a server writes its 403 and is then descheduled for >700 ms before closing, the -seven `assert state == :closed` tests read `:open` and fail — the *old* failure direction, at a -much smaller window. So this is **narrowing, not elimination**, and I would not sign a claim that -the class is gone. - -It is not a threshold fix wearing a proof, because the fix moved the *branch*, not the number, and -the file says so in its own words ("It is still a window, and it is named as one. `:open` is the -ABSENCE of an event and cannot be decided any other way over a socket"). That is the honest -version and I am not asking for it to change. **Non-blocking**, recorded so nobody later reads -"terminates on the protocol" as covering `:open`. - -## 3. The mutation table reproduces, independently - -`PASSES=1 tools/mutate.sh score Mc2 Mc3 M2never Md1`, on this tree, quoted from its output: - - Mc2 | 162 tests, 0 failures TEST_EXIT=0 - Mc3 | 162 tests, 2 failures TEST_EXIT=2 - M2never | 162 tests, 0 failures TEST_EXIT=0 - Md1 | 162 tests, 9 failures TEST_EXIT=2 - -Both recorded survivors (`Mc2`, `M2never`) read as survivors; `Mc3` reads 2 and `Md1` reads 9, -equal to slice 003's table and to `logs/green-mutation-under-load.txt`. `Md1` names 9 failing -tests, 7 of them the live-listener refusal tests, so the read logic has not been made unable to -fail on the behaviour it exists to measure. `git status --porcelain` after the run showed no -tracked modification: `lib/` was restored. - -Instrument nit, non-blocking: `score`'s header line prints `dirty=$(git status --porcelain | wc --l)`, which counted my four untracked log files as `dirty=4`. It cannot distinguish "uncommitted -`lib/` changes" from "untracked files in `slices/`", which is the thing a reader would use it for. - -## 4. **BLOCKING — the repeat can launder a genuine server defect, and nothing pins its bound** - -This is the finding. Three results, in order. - -**(a) `@attempts` is a contained anchor.** `H4`, changing `@attempts 5` to `@attempts 2`: - - mix test test/beam_mcp/transport/http_bandit_test.exs - 11 tests, 0 failures TEST_EXIT=0 - -Nothing moved. The reason is visible in the anchor itself — the "server that never answers" test -asserts - - ~r/#{@attempts} exchange\(s\) in a row produced no measurement/ - -against a message built from the same `@attempts`. The constant is on both sides of the -comparison, so it cannot disagree with itself. This is exactly CONVENTIONS.md's **contained -anchor** shape. - -**(b) The whole repeat mechanism can be deleted and the suite stays green.** `H5`, `@attempts 5` --> `1` (with `attempt < @attempts` false on the first pass, no exchange is ever repeated): - - mix test - 162 tests, 0 failures TEST_EXIT=0 - -Fault 2's entire fix — the thing `logs/probe-loss-site.txt` was measured to justify and the thing -`@attempts` is derived for ("5% at its worst leaves 5 attempts at 3e-7") — carries **no anchor at -all** on an idle machine. Both new tests pass without it. - -**(c) An intermittently silent server is repeated into a pass.** I appended one temporary test: a -`fake_listener` whose handler closes without answering on the first four connections and answers -on the fifth — a server broken 80% of the time. Output: - - http_bandit_test: exchange 1/5 produced no measurement (:closed after 0/1 complete responses, 0 bytes). Repeating on a fresh connection. - ... 2/5 ... 3/5 ... 4/5 ... - TEMP-PROBE: {"HTTP/1.1 200 OK\r\ncontent-length: 11\r\n\r\n{\"ok\":true}", :closed} after 5 connections - 12 tests, 0 failures - TEST_EXIT=0 - -**A server that fails four connections in five reports a clean pass.** FINDINGS says "A server -that genuinely never answers fails every attempt and raises, so nothing is masked." That sentence -is true only of a *deterministic* silence. The repeat is designed to absorb a ~5% loss and it -cannot tell a 5% loss caused by an RST on the wire from a 5% loss caused by the server, because -the predicate — *the connection ended with fewer than `expect` complete responses* — is identical -in both cases. `logs/probe-loss-site.txt` could separate them only because it instrumented the -plug's `authorize` callback; the shipping harness has no such instrument. - -And the one signal that survives is dropped by the scoring instrument: - - grep -c 'produced no measurement' logs/green-mutation-under-load.txt -> 0 - grep -c 'produced no measurement' logs/green-rate-mc8-load32.txt -> 166 - -`mutate.sh`'s `suite()` keeps only the count line and the failed-test names, so a defect absorbed -by the repeat leaves **no trace in any scored run**. (The 166 checks out against FINDINGS' -arithmetic: 40 suites x 4 announcements from the anchor test itself = 160, plus the 6 real ones.) - -**What would clear it.** Any one of these, not all three: - -1. An anchor that moves when `@attempts` moves — e.g. a listener that stays silent for exactly - `n` connections then answers, asserting a pass at `n = @attempts - 1` and a raise at - `n = @attempts`. That pins the bound and, written that way, states in the suite what (c) - demonstrates: the repeat *is* able to convert an intermittent defect into a pass, up to its - bound. The anchor must not interpolate `@attempts` into its own expectation. -2. Make the repeat count observable to the scorer — count announcements per suite and fail (or at - minimum print into the count line `mutate.sh` keeps) above the measured 6-in-40 baseline, so an - absorbed defect cannot be silent in a mutation table. -3. If neither is wanted, say in FINDINGS what is actually true: the repeat cannot distinguish a - lost segment from an intermittently silent server, so it absorbs both up to 5 attempts, and the - only evidence it is not absorbing a real defect is the unchanged mutation table. Replace - "nothing is masked" — that claim is measurably too strong. - -I would take (1) plus (3). - -## 5. **BLOCKING (minor) — the anchor evidence quotes counts the archive does not contain** - -FINDINGS' "The two new anchors, and they move" reads: - - H1 ... 162 tests, 2 failures TEST_EXIT=2 - H2 ... 162 tests, 1 failure TEST_EXIT=2 - unmutated 162 tests, 0 failures - -`grep -n '162\|tests,' logs/mutation-harness-anchors.txt` returns, from the file itself: - - 57:11 tests, 2 failures - 105:11 tests, 1 failure - 110:11 tests, 0 failures - -The archive ran the **single file** (`mix test test/beam_mcp/transport/http_bandit_test.exs`), so -its totals are 11, not 162. The failure counts (2, 1, 0) and the conclusion are right; the totals -were typed to match the suite figure rather than quoted from the run that is cited as their -evidence. That is the one rule this slice exists to defend — "Counts are quoted from command -output, never typed" — broken inside the slice's own proof, and it is why I am blocking on -something so small. - -**What would clear it:** print the file-scoped totals as the archive prints them (`11 tests, ...`) -and name the command that produced them, or re-run the two mutants over the full suite and archive -that instead. - -## 6. `expect` does not make the existing assertions vacuous — but it changes how they fail - -`settle/2` keeps accumulating (`{:tcp, ^sock, data} -> settle(sock, acc <> data)`), so `responses/1` -still counts everything that arrives inside the hold window and an over-count still fails. Checked -by effect rather than by reading: `H3` — `content_length/1` returning `{:ok, 0}`, so completeness -stops depending on the declared body length, a mutation **the archive does not use** — gave - - 162 tests, 3 failures TEST_EXIT=2 - 1) ... an ordinary 200 keeps the connection and answers the pipelined second request - 2) ... a refusal AFTER the body has been read keeps the connection - 3) ... a response split across the hold window is read whole, not cut at it - -So the completeness change **is** anchored, by a mutation independent of `H1`/`H2`, and the two -`responses(bytes) == 2` tests move under it too. Neither of the COMPILER KILL or CONTAINED ANCHOR -shapes applies here: the mutant compiles, and the assertion is on an observable byte count. - -Worth stating rather than blocking on: with `expect = 2`, the *downward* half of -`assert responses(bytes) == 2` is now guaranteed by construction — a server that answers once -never reaches the assertion, it exhausts `@attempts` and raises. The suite still fails (H3's -failures 1 and 2 are exactly that path), but it fails saying *"5 exchange(s) in a row produced no -measurement ... a server that does not answer"* about a server that answered once. That message is -wrong for that defect, and it costs five connections to produce. Not vacuous; mislabelled. - -## 7. `lib/` is untouched - - git diff a02e560 --stat -- lib/ (no output, exit 0) - -Confirmed again by `git status --porcelain` after `tools/mutate.sh check` and after the `score` -run, both of which reported the target restored. - ---- - -## What I did not check - -- **CI.** PLAN acceptance criterion 4 is "demonstrated at CI's `max_cases: 8`, in CI". I ran - nothing in CI and read no CI run for this branch. Per CONVENTIONS.md that criterion is - unverified until a run exists, and nothing in this verdict speaks to it. -- **The rate claims.** I did not re-run 100 suites at either profile, or 40 under 32 busy loops. I - read `logs/green-rate-*.txt` for the announcement counts only. The 0-of-100 and 0-of-40 numbers - are taken on the record's word. -- **The other six mutants.** I scored 4 of 10, at `PASSES=1`, on an idle machine — enough to - confirm the table reproduces and the survivors survive, not enough to speak to variance under - load. -- The prose, the README, `HANDOFF.md`, and whether `tools/mutate.sh` is re-runnable by someone with - only this repository beyond the `check`/`score`/`run` paths I used. Lane `h`. diff --git a/slices/006-harness-honesty/logs/round1.m.tree b/slices/006-harness-honesty/logs/round1.m.tree deleted file mode 100644 index 19a6ec0a..00000000 --- a/slices/006-harness-honesty/logs/round1.m.tree +++ /dev/null @@ -1,6 +0,0 @@ -e2f8a0898362319a3aeb44a5a89e090d546858ff -# tree of commit 90e4e99, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 1 LANE m READ. Branch slice/006-harness-honesty. -# Commits read in full: 90e4e99, 24370ce, 4a10c0d, 6050eff; base a02e560. -# Also read: 6050eff~1:test/beam_mcp/transport/http_bandit_test.exs (the pre-fix drain/2). -# HEAD at read time: 90e4e99f8bda256fc7c5a526e4fc2b3bd8ef6d25 diff --git a/slices/006-harness-honesty/logs/round2.h.md b/slices/006-harness-honesty/logs/round2.h.md deleted file mode 100644 index 1d5e255c..00000000 --- a/slices/006-harness-honesty/logs/round2.h.md +++ /dev/null @@ -1,80 +0,0 @@ - - -# Round 2, lane h — the record and the instrument - -**INDEPENDENCE, STATED FIRST.** Two written passes by **one reader**, not two readers. Round 1's -lanes were separate agents; these are not. "Two lanes" here is not a claim of independence. - -Tree read: `2f03bec5521bc0b45853b69667b54b2953c27eb9` (commit `716526e8aa8184a6c98abf13de931281ee1bea11`). - -## The finding of this round, and it is about an archive rather than the code - -**The provenance notes destroyed the evidence they cite.** Each of the four `*-round2` archives -carries a hand-added note arguing it is the clean re-run because the four births form "an unbroken -serial chain". Measured: - - birth 13:36:56 mtime 13:36:56 all four, identical to the millisecond - -Birth equal to mtime, and all four equal to each other, is the signature of a wholesale rewrite. -**Prepending each note rewrote its file and reset the very timestamp the note offers as proof.** -The archive cited as evidence was consumed by the act of citing it. - -This is the slice's own subject one level up, and it is the third time in this repository the -failure has moved outward from the code: defect, then test, then record, then — here — the -*mechanism by which a record is corrected*. - -**It is corrected by appending, not by deletion**, in all four files and in FINDINGS. What -survives is the driver's own `date:` lines, which establish one serial run and cannot rule out -interference in its opening minutes; there is no later quiet-machine scoring table to cite, since -`mutation-harness-anchors-round2.txt` is *earlier* at 12:06:42Z. Recorded as unresolved. - -## What else I checked - -**B1 is not repeated in the Round 2 tables.** Every count there is paired to its label by - - awk '/^H[0-9] applied/{lab=$1} /^164 tests/{if(lab!=""){print lab" -> "$0; lab=""}}' - -rather than read off adjacent lines, which is how the round-1 table came to print a suite total -beside a single-file archive. Round 1's table is left standing with its defect, as the finding. - -**The CI correction is appended, not substituted.** Round 1's "the CI transcript did not print the -argument" is false — `ci-evidence.txt` carries `# 1` and `""` in both red runs — and the -sentence is corrected beneath itself rather than edited away. - -**The repeat is now visible in a scored archive.** `exchanges repeated:` appears 3 times in -`green-mutation-under-load-round2.txt`, so a defect the harness absorbs can no longer be silent -in a table — the gap that let a 30-run check count retries as successes. - -**`mutate.sh` refuses a dirty target**, proven red-then-green in `probe-mutate-dirty-target.txt`, -which closes the path where a SIGKILL-orphaned mutant becomes the next run's pristine. - -## Verdict - -**approve**, with the provenance uncertainty recorded rather than closed. The record now states -what it cannot show, which is the property this slice exists to produce. - -Bounded by the independence limit at the head of this file. - -## Re-read after the rebase onto PR #18 - -`signoff.sh verify` refused after this branch was rebased onto `main` carrying PR #18: the tree -the lanes approved (`1d9e1430`) is not the tree that now ships (`1d84c05c`). That refusal is the -mechanism working, and it is recorded here rather than worked around. - -**The delta was re-read in full before re-recording**, not assumed: - - $ git diff f0350d3..HEAD --stat - CHANGELOG.md | 4 ---- - HANDOFF.md | 7 ------- - 2 files changed, 11 deletions(-) - -Eleven deleted lines in two documentation files — the stale "Known gaps" bullets that claimed the -invalid-UTF-8 defect was unfixed while the same section listed it as fixed. No code, no test, no -archive, and nothing `mix test` or `tools/mutate.sh` reads: the suite references `CHANGELOG.md` -only as a filename in `mix.exs` `files:`, never its contents. - -**This verdict is unchanged by that delta**, and the re-record says so with the delta named rather -than re-approving a tree nobody looked at. diff --git a/slices/006-harness-honesty/logs/round2.h.tree b/slices/006-harness-honesty/logs/round2.h.tree deleted file mode 100644 index acf60fdf..00000000 --- a/slices/006-harness-honesty/logs/round2.h.tree +++ /dev/null @@ -1,7 +0,0 @@ -2f03bec5521bc0b45853b69667b54b2953c27eb9 -# tree of commit 716526e, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 2 LANE h READ. Branch slice/006-harness-honesty. -# Read: FINDINGS.md Round 2, the four *-round2 archives and their notes, ci-evidence.txt, -# probe-mutate-dirty-target.txt, tools/mutate.sh. -# HEAD at read time: 716526e8aa8184a6c98abf13de931281ee1bea11 -# Lane m and lane h are two written passes by ONE reader. Not two parties. diff --git a/slices/006-harness-honesty/logs/round2.m.md b/slices/006-harness-honesty/logs/round2.m.md deleted file mode 100644 index 09553051..00000000 --- a/slices/006-harness-honesty/logs/round2.m.md +++ /dev/null @@ -1,78 +0,0 @@ - - -# Round 2, lane m — mechanism - -**INDEPENDENCE, STATED FIRST BECAUSE IT LIMITS EVERYTHING BELOW.** This round's two lanes are -**two written passes by one reader**, not two readers. Round 1's lanes were separate agents; these -are not. A second pass by the same reader shares its assumptions, its blind spots and whatever the -first pass concluded, and "two lanes" must not be read here as independence. Recorded in the -verdict rather than in a footnote elsewhere, per the convention added in PR #14. - -Tree read: `2f03bec5521bc0b45853b69667b54b2953c27eb9` (commit `716526e8aa8184a6c98abf13de931281ee1bea11`). - -## What I checked - -**The FIN/RST distinction, in the code rather than in the claim.** `exchange/4` at :191-236: - - {:aborted, reason, acc} when attempt < @attempts -> repeat on a fresh connection - {:aborted, reason, acc} -> raise - {:unanswered, acc} -> raise, no repeat - {bytes, state} -> measurement - -A clean close carrying no answer takes the `:unanswered` branch and raises **immediately** — it -is never repeated. Only an abort is. That is the B2 fix as specified, and it is a distinction -rather than a threshold: nothing here is a tunable number deciding truth. - -**The claim under it is measured, not argued.** The moduledoc at :125-163 records 250 exchanges -against the real listener: every one `:econnreset`, zero clean closes, 19 losing the response. So -"only an abort can destroy a response already written" is an observation about this adapter, with -its population and counts, not a deduction. - -**Both round-1 blind spots now move**, at full-suite scale, verified by pairing label to count in -`mutation-harness-anchors-round2.txt` rather than reading them off adjacently: - - H1 -> 164 tests, 4 failures H4 -> 164 tests, 2 failures - H2 -> 164 tests, 1 failure H5 -> 164 tests, 1 failure - -H4 is `@attempts 5 -> 1`, deleting the repeat, which was invisible in round 1 because the -expected text interpolated `#{'#'}{@attempts}` and the mutation moved both sides together. H5 is -lane m's own round-1 attack — a server answering only on a later attempt — now a test. - -## One observation, not blocking - -**The de-containment rests on H4 killing, not on the stderr message.** That message still -interpolates `#{'#'}{@attempts}` (:220-224). It is the *assertion* that now carries a literal, so -the anchor moves; but a reader skimming for "the literal" will find an interpolation in the -nearest string and may conclude the fix is absent. The evidence that it is not is H4, measured. -Worth a sentence beside that message if this is touched again; not worth a round. - -## Verdict - -**approve.** The mechanism is right, the distinction is the correct shape, and the anchors that -prove it can move do move. `lib/` is untouched — `git diff origin/main..HEAD -- lib/` is empty. - -Bounded by the independence limit at the head of this file. - -## Re-read after the rebase onto PR #18 - -`signoff.sh verify` refused after this branch was rebased onto `main` carrying PR #18: the tree -the lanes approved (`1d9e1430`) is not the tree that now ships (`1d84c05c`). That refusal is the -mechanism working, and it is recorded here rather than worked around. - -**The delta was re-read in full before re-recording**, not assumed: - - $ git diff f0350d3..HEAD --stat - CHANGELOG.md | 4 ---- - HANDOFF.md | 7 ------- - 2 files changed, 11 deletions(-) - -Eleven deleted lines in two documentation files — the stale "Known gaps" bullets that claimed the -invalid-UTF-8 defect was unfixed while the same section listed it as fixed. No code, no test, no -archive, and nothing `mix test` or `tools/mutate.sh` reads: the suite references `CHANGELOG.md` -only as a filename in `mix.exs` `files:`, never its contents. - -**This verdict is unchanged by that delta**, and the re-record says so with the delta named rather -than re-approving a tree nobody looked at. diff --git a/slices/006-harness-honesty/logs/round2.m.tree b/slices/006-harness-honesty/logs/round2.m.tree deleted file mode 100644 index 709d7432..00000000 --- a/slices/006-harness-honesty/logs/round2.m.tree +++ /dev/null @@ -1,6 +0,0 @@ -2f03bec5521bc0b45853b69667b54b2953c27eb9 -# tree of commit 716526e, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 2 LANE m READ. Branch slice/006-harness-honesty. -# Commits read in full: 716526e, 54f9bb1, 2334adf; earlier rounds as history. -# HEAD at read time: 716526e8aa8184a6c98abf13de931281ee1bea11 -# Lane m and lane h are two written passes by ONE reader. Not two parties. diff --git a/slices/006-harness-honesty/logs/round3.h.md b/slices/006-harness-honesty/logs/round3.h.md deleted file mode 100644 index af59a310..00000000 --- a/slices/006-harness-honesty/logs/round3.h.md +++ /dev/null @@ -1,48 +0,0 @@ - - -# Round 3, lane h — a re-read forced by the rebase - -**INDEPENDENCE.** Two written passes by **one reader**, not two readers, as in round 2. - -## Why this round exists - -Round 2 approved tree `1d9e1430`. This branch was then rebased onto `main` carrying PR #18, and -`tools/signoff.sh verify` **refused**: - - round 2 h: STALE - read: 1d9e14303d1c3cfe816c48c41f561de13ae54f1f - now: - A stale record is slice 001b's failure: the tree moved after the lanes approved it. - SIGNOFF REFUSED VERIFY_EXIT=1 - -That is the guard working. Re-recording round 2 in place was attempted and **the tool refused -that too** — *"a verdict is appended, never rewritten … record the revision as the next round"* — -so this is that round rather than an edit of the last one. - -## What was re-read - -The complete delta between the approved tree and the shipping tree, read in full before any -verdict: - - $ git diff f0350d3..HEAD --stat - CHANGELOG.md | 4 ---- - HANDOFF.md | 7 ------- - 2 files changed, 11 deletions(-) - -Eleven deleted lines in two documentation files: the stale **Known gaps** bullets asserting the -invalid-UTF-8 defect was unfixed, while the same `[0.3.1]` section listed it under **Fixed**. -PR #18 removed them. - -**Nothing executable moved.** No `lib/`, no `test/`, no `tools/`, no archive. The suite -references `CHANGELOG.md` only as a filename in `mix.exs` `files:` (`readme_claims_test.exs:101`, -`:399`) and never reads its contents, so no count in any archive can have moved. - -## Verdict - -**approve.** The delta is documentation-only and removes a false statement; nothing round 2 -examined is changed by it. The round-2 findings stand as written. - -Bounded by the independence limit above. diff --git a/slices/006-harness-honesty/logs/round3.h.tree b/slices/006-harness-honesty/logs/round3.h.tree deleted file mode 100644 index c0802fbd..00000000 --- a/slices/006-harness-honesty/logs/round3.h.tree +++ /dev/null @@ -1,6 +0,0 @@ -233cad19726ed1fcb3957f7f7d158a177a0bee82 -# tree of commit 3d48ccd, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 3 LANE h READ. Branch slice/006-harness-honesty, rebased onto #18. -# Re-read in full: git diff f0350d3..HEAD -- 11 deletions, CHANGELOG.md and HANDOFF.md only. -# HEAD at read time: 3d48ccd4a15755e67091f502a851656628c8afda -# Lane m and lane h are two written passes by ONE reader. Not two parties. diff --git a/slices/006-harness-honesty/logs/round3.m.md b/slices/006-harness-honesty/logs/round3.m.md deleted file mode 100644 index e5d1380b..00000000 --- a/slices/006-harness-honesty/logs/round3.m.md +++ /dev/null @@ -1,48 +0,0 @@ - - -# Round 3, lane m — a re-read forced by the rebase - -**INDEPENDENCE.** Two written passes by **one reader**, not two readers, as in round 2. - -## Why this round exists - -Round 2 approved tree `1d9e1430`. This branch was then rebased onto `main` carrying PR #18, and -`tools/signoff.sh verify` **refused**: - - round 2 m: STALE - read: 1d9e14303d1c3cfe816c48c41f561de13ae54f1f - now: - A stale record is slice 001b's failure: the tree moved after the lanes approved it. - SIGNOFF REFUSED VERIFY_EXIT=1 - -That is the guard working. Re-recording round 2 in place was attempted and **the tool refused -that too** — *"a verdict is appended, never rewritten … record the revision as the next round"* — -so this is that round rather than an edit of the last one. - -## What was re-read - -The complete delta between the approved tree and the shipping tree, read in full before any -verdict: - - $ git diff f0350d3..HEAD --stat - CHANGELOG.md | 4 ---- - HANDOFF.md | 7 ------- - 2 files changed, 11 deletions(-) - -Eleven deleted lines in two documentation files: the stale **Known gaps** bullets asserting the -invalid-UTF-8 defect was unfixed, while the same `[0.3.1]` section listed it under **Fixed**. -PR #18 removed them. - -**Nothing executable moved.** No `lib/`, no `test/`, no `tools/`, no archive. The suite -references `CHANGELOG.md` only as a filename in `mix.exs` `files:` (`readme_claims_test.exs:101`, -`:399`) and never reads its contents, so no count in any archive can have moved. - -## Verdict - -**approve.** The delta is documentation-only and removes a false statement; nothing round 2 -examined is changed by it. The round-2 findings stand as written. - -Bounded by the independence limit above. diff --git a/slices/006-harness-honesty/logs/round3.m.tree b/slices/006-harness-honesty/logs/round3.m.tree deleted file mode 100644 index 7efa9642..00000000 --- a/slices/006-harness-honesty/logs/round3.m.tree +++ /dev/null @@ -1,6 +0,0 @@ -233cad19726ed1fcb3957f7f7d158a177a0bee82 -# tree of commit 3d48ccd, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 3 LANE m READ. Branch slice/006-harness-honesty, rebased onto #18. -# Re-read in full: git diff f0350d3..HEAD -- 11 deletions, CHANGELOG.md and HANDOFF.md only. -# HEAD at read time: 3d48ccd4a15755e67091f502a851656628c8afda -# Lane m and lane h are two written passes by ONE reader. Not two parties. diff --git a/slices/006-harness-honesty/logs/round4.h.md b/slices/006-harness-honesty/logs/round4.h.md deleted file mode 100644 index d6df6dc8..00000000 --- a/slices/006-harness-honesty/logs/round4.h.md +++ /dev/null @@ -1,36 +0,0 @@ - - -# Round 4, lane h — forced by the instrument, not by a finding - -**INDEPENDENCE.** Two written passes by **one reader**, as in rounds 2 and 3. - -**This round exists because `signoff.sh` refused again**, not because anything was found. After -round 3 approved, one further commit landed — untracking `signoff/verify.txt` and adding a -`.gitignore` comment — and `verify` marked both round-3 records STALE. Correctly: the tree moved -after the lanes approved it. - -## What was re-read - - $ git diff ..HEAD --stat - .gitignore | 4 ++++ - slices/006-harness-honesty/signoff/verify.txt | (untracked) - -One ignore rule and the removal of a regenerated file from the index. **No `lib/`, no `test/`, -no `tools/`, no archive, no verdict.** The cause was mine: a blanket `git add -A` tracked a file -`signoff.sh` rewrites on every run, which carries no SPDX header, and the widened REUSE step -failed on it exactly as it should: - - reuse FAIL (293 tracked; ...) no SPDX-License-Identifier ... - slices/006-harness-honesty/signoff/verify.txt - -A header would have been the wrong fix — the next `verify` would drop it. - -## Verdict - -**approve.** Nothing examined in rounds 1–3 is changed. The round-3 findings stand. - -The cap being exceeded is recorded in FINDINGS as a limitation of the instrument rather than a -fourth review, together with the discipline it teaches: make every tree change first, record last. diff --git a/slices/006-harness-honesty/logs/round4.h.tree b/slices/006-harness-honesty/logs/round4.h.tree deleted file mode 100644 index 28e93c5a..00000000 --- a/slices/006-harness-honesty/logs/round4.h.tree +++ /dev/null @@ -1,6 +0,0 @@ -ba9ca35884ae1c94a9c79a295c7e6375b74c7760 -# tree of commit b3a80eb, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 4 LANE h READ. Branch slice/006-harness-honesty. -# Re-read: .gitignore +4, signoff/verify.txt untracked. Nothing executable. -# HEAD at read time: b3a80eba2bc55685efc122010ecbfd34864cf70f -# Lane m and lane h are two written passes by ONE reader. Not two parties. diff --git a/slices/006-harness-honesty/logs/round4.m.md b/slices/006-harness-honesty/logs/round4.m.md deleted file mode 100644 index 2c3c8c18..00000000 --- a/slices/006-harness-honesty/logs/round4.m.md +++ /dev/null @@ -1,36 +0,0 @@ - - -# Round 4, lane m — forced by the instrument, not by a finding - -**INDEPENDENCE.** Two written passes by **one reader**, as in rounds 2 and 3. - -**This round exists because `signoff.sh` refused again**, not because anything was found. After -round 3 approved, one further commit landed — untracking `signoff/verify.txt` and adding a -`.gitignore` comment — and `verify` marked both round-3 records STALE. Correctly: the tree moved -after the lanes approved it. - -## What was re-read - - $ git diff ..HEAD --stat - .gitignore | 4 ++++ - slices/006-harness-honesty/signoff/verify.txt | (untracked) - -One ignore rule and the removal of a regenerated file from the index. **No `lib/`, no `test/`, -no `tools/`, no archive, no verdict.** The cause was mine: a blanket `git add -A` tracked a file -`signoff.sh` rewrites on every run, which carries no SPDX header, and the widened REUSE step -failed on it exactly as it should: - - reuse FAIL (293 tracked; ...) no SPDX-License-Identifier ... - slices/006-harness-honesty/signoff/verify.txt - -A header would have been the wrong fix — the next `verify` would drop it. - -## Verdict - -**approve.** Nothing examined in rounds 1–3 is changed. The round-3 findings stand. - -The cap being exceeded is recorded in FINDINGS as a limitation of the instrument rather than a -fourth review, together with the discipline it teaches: make every tree change first, record last. diff --git a/slices/006-harness-honesty/logs/round4.m.tree b/slices/006-harness-honesty/logs/round4.m.tree deleted file mode 100644 index 4a0454b9..00000000 --- a/slices/006-harness-honesty/logs/round4.m.tree +++ /dev/null @@ -1,6 +0,0 @@ -ba9ca35884ae1c94a9c79a295c7e6375b74c7760 -# tree of commit b3a80eb, written by: git rev-parse 'HEAD^{tree}' -# THIS IS THE TREE ROUND 4 LANE m READ. Branch slice/006-harness-honesty. -# Re-read: .gitignore +4, signoff/verify.txt untracked. Nothing executable. -# HEAD at read time: b3a80eba2bc55685efc122010ecbfd34864cf70f -# Lane m and lane h are two written passes by ONE reader. Not two parties. diff --git a/slices/006-harness-honesty/signoff/round1.h.signoff b/slices/006-harness-honesty/signoff/round1.h.signoff deleted file mode 100644 index 1284ba87..00000000 --- a/slices/006-harness-honesty/signoff/round1.h.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 1 -lane: h -verdict: changes-required -tree: 1563fc672cf217b97d87cecd7c2d653b09e61cf2 -commit: eff906ca76c6ce59d86c46018e376195ce150efd -recorded: 2026-09-08T11:59:00Z -note: the anchor table quotes a suite run that never happened; the CI premise has no archive diff --git a/slices/006-harness-honesty/signoff/round1.m.signoff b/slices/006-harness-honesty/signoff/round1.m.signoff deleted file mode 100644 index 762d8928..00000000 --- a/slices/006-harness-honesty/signoff/round1.m.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 1 -lane: m -verdict: changes-required -tree: 1563fc672cf217b97d87cecd7c2d653b09e61cf2 -commit: eff906ca76c6ce59d86c46018e376195ce150efd -recorded: 2026-09-08T11:59:00Z -note: the repeat is a contained anchor and can launder an intermittently silent server diff --git a/slices/006-harness-honesty/signoff/round2.h.signoff b/slices/006-harness-honesty/signoff/round2.h.signoff deleted file mode 100644 index e14aab77..00000000 --- a/slices/006-harness-honesty/signoff/round2.h.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 2 -lane: h -verdict: approve -tree: 1d9e14303d1c3cfe816c48c41f561de13ae54f1f -commit: bd4a74a0aa7fd728f39bb90ba6200b6376219056 -recorded: 2026-09-08T13:52:18Z -note: record: provenance notes destroyed the evidence they cite; corrected by appending, recorded unresolved diff --git a/slices/006-harness-honesty/signoff/round2.m.signoff b/slices/006-harness-honesty/signoff/round2.m.signoff deleted file mode 100644 index 74fd5056..00000000 --- a/slices/006-harness-honesty/signoff/round2.m.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 2 -lane: m -verdict: approve -tree: 1d9e14303d1c3cfe816c48c41f561de13ae54f1f -commit: bd4a74a0aa7fd728f39bb90ba6200b6376219056 -recorded: 2026-09-08T13:52:18Z -note: mechanism: distinction not threshold; H4 and H5 move; lib untouched diff --git a/slices/006-harness-honesty/signoff/round3.h.signoff b/slices/006-harness-honesty/signoff/round3.h.signoff deleted file mode 100644 index bd111ce8..00000000 --- a/slices/006-harness-honesty/signoff/round3.h.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 3 -lane: h -verdict: approve -tree: 5c19f5f654a71c2c1d22602146b03a7db0354e76 -commit: 953d1de69a68cc49e5342f6afd9499442cd88cbe -recorded: 2026-09-08T14:26:27Z -note: re-read of the rebase delta: 11 deletions in CHANGELOG.md and HANDOFF.md, nothing executable moved diff --git a/slices/006-harness-honesty/signoff/round3.m.signoff b/slices/006-harness-honesty/signoff/round3.m.signoff deleted file mode 100644 index 08688a62..00000000 --- a/slices/006-harness-honesty/signoff/round3.m.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 3 -lane: m -verdict: approve -tree: 5c19f5f654a71c2c1d22602146b03a7db0354e76 -commit: 953d1de69a68cc49e5342f6afd9499442cd88cbe -recorded: 2026-09-08T14:26:27Z -note: re-read of the rebase delta: 11 deletions in CHANGELOG.md and HANDOFF.md, nothing executable moved diff --git a/slices/006-harness-honesty/signoff/round4.h.signoff b/slices/006-harness-honesty/signoff/round4.h.signoff deleted file mode 100644 index 77b60946..00000000 --- a/slices/006-harness-honesty/signoff/round4.h.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 4 -lane: h -verdict: approve -tree: bad71ef1ab66e44cdf839eafffae3445a54a7d7c -commit: 7d8c111797f0c7dc7e1fba174af04ff636480744 -recorded: 2026-09-08T14:29:36Z -note: forced by the guard after a .gitignore fix; delta re-read, nothing executable diff --git a/slices/006-harness-honesty/signoff/round4.m.signoff b/slices/006-harness-honesty/signoff/round4.m.signoff deleted file mode 100644 index 3f1022f4..00000000 --- a/slices/006-harness-honesty/signoff/round4.m.signoff +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# A review verdict and the tree it is about, in one file, because this repository has -# shipped 16 verdicts bound to no tree and 2 trees carrying no verdict. Written by -# tools/signoff.sh; the tree is HEAD's tree with slices/*/signoff/ removed. -# -# This records WHICH tree the verdict is about. It cannot show that anyone read it. - -slice: slices/006-harness-honesty -round: 4 -lane: m -verdict: approve -tree: bad71ef1ab66e44cdf839eafffae3445a54a7d7c -commit: 7d8c111797f0c7dc7e1fba174af04ff636480744 -recorded: 2026-09-08T14:29:36Z -note: forced by the guard after a .gitignore fix; delta re-read, nothing executable diff --git a/slices/007-authorize-body/FINDINGS.md b/slices/007-authorize-body/FINDINGS.md deleted file mode 100644 index fb109f42..00000000 --- a/slices/007-authorize-body/FINDINGS.md +++ /dev/null @@ -1,130 +0,0 @@ - - -# Slice 007 — findings - -## The three decisions, made deliberately - -### (a) Where the hook runs: in `handle/2`, between `before_body/2` and `decode/2` - -Two reasons, and the second is the load-bearing one. - -It **must precede `Jason.decode`**, because the second argument is the bytes the client sent. - -And it must **not** go inside `before_body/2`. That function is not a list of steps — it is the -*split* at the body read, and its `case` applies `close_after/1` to every refusal it produces. A -post-read hook placed there would inherit that closure and quietly falsify the invariant the -function's own comment states. `check_headers/3` is on the far side but runs *after* `decode/2`, -so it is too late. **Between the two is the only position that is both after the read and before -the parse.** - -### (b) Status: `403` for a refusal, `500` for a raising hook - -Identical to `authorize/1` at every point. Two hooks answering the same question with different -codes would make the status a hint about *which* check failed, and the contract for both is that -the caller learns nothing. A distinct code would be exactly the leak the opacity rule forbids. - -### (c) No `connection: close` — the one place the answer differs from `authorize/1` - -It differs because the fact underneath differs. A pre-read refusal answers over a body still on -the wire, so the adapter drains it on the server's behalf; that is what `close_after/1` declines. -Here the body is already read: the connection is clean and an ordinary response is possible. -`before_body/2`'s own comment pins the invariant — - -> `decode/2` and everything after it are on the far side: the body is read by then, the -> connection is clean, and a refusal there keeps it. That is pinned in both directions. - -Closing here would **break** that pin rather than honour it, and would cost a keep-alive -connection per refusal for nothing. - -## The raw-bytes test, demonstrated red before it passed - -A test never observed failing is not evidence. The call site was temporarily changed to hand the -hook `Jason.encode!(Jason.decode!(body))` — `logs/red-raw-bytes.txt`: - - 1) test :authorize_body/2 — the post-read hook, and the bytes it is handed - the hook receives the request body byte-identically, not a re-encoding - code: assert seen == @odd_body - left: "{\"id\":7,\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"arguments\":{},\"name\":\"echo\"}}" - right: "{\"jsonrpc\":\"2.0\" , \"method\":\"tools/call\",\n \"params\":{\"name\":\"echo\",\"arguments\":{}}, \"id\":7}" - -`left` is the round trip: keys sorted, padding gone, newline gone. `right` is what the client -sent. That is the whole defect a signature-verifying host would experience as broken crypto. - -**The red took two unrelated tests with it, which was not predicted:** - - 2) invalid JSON is a parse error left: 500 right: 400 - 3) an empty body is a parse error left: 500 right: 400 - -`Jason.decode!` at the call site raises before `decode/2`'s error path can answer. So the -mutation is wrong for a second reason nobody stated in advance, and it is recorded rather than -tidied away. - -Reverted, and the revert verified byte-identical against a pre-red copy rather than assumed. -`logs/green-raw-bytes.txt`: **`99 tests, 0 failures`, `TEST_EXIT=0`** for that file. - -## Mutation scores — both KILL, zero variance - -`tools/mutate.sh score Mab1 Mab2`, 2 passes, `logs/mutation-authorize-body.txt`: - - tree: cb39add5b56542d0d743ce909bd49571396af7f2 - Mab1 | 172 tests, 5 failures TEST_EXIT=2 | 172 tests, 5 failures TEST_EXIT=2 - Mab2 | 172 tests, 5 failures TEST_EXIT=2 | 172 tests, 5 failures TEST_EXIT=2 - -**Mab1** removes the hook entirely — the call site *and* both clauses, because dropping only the -call would leave `authorize_body/3` unused and `--warnings-as-errors` would reject the build -before a test ran. That is a compiler kill, which records a kill that never happened. It kills -all five behavioural tests. - -**Mab2** hands the hook a re-encoding. It kills the raw-bytes test plus four others, including -`HTTPBanditTest`'s live-listener check that a post-read refusal keeps the connection. - -So the hook is not deletable without a red suite, and the raw-bytes guarantee is not removable -without a red suite. Those were the two things the mutants existed to establish. - -## Two things found while doing this, neither predicted - -**A README claim moved, and its test moved with it.** The paragraph asking *"Whether `authorize/1` -should instead run after the body is read … is an open design question … not something this -release settles"* is answered by this slice, so it is gone. `readme_claims_test.exs` pinned it -with `claims("open design question")` and went red — which is the convention working exactly as -written: *a test pinning a sentence nobody makes any more fails too*. It is **replaced**, not -deleted, by a pin on the sentence that settles the question. The two fragments about -`authorize/1`'s own limitation are untouched, because that limitation is still true of -`authorize/1` — the hook sits beside it rather than widening it. - -**Three new claim fragments failed on the README's hard wrap.** `"authorize/1 keeps its position -before the body read"` spans a line break in the file. Each fragment is now checked against the -README with `grep` before being written into the test, and the test says so, because the next -person adding a claim will hit the same wall. - -## Open, recorded rather than fixed - -- **The hook cannot refuse *before* the body is buffered**, by construction — that is - `authorize/1`'s job and the reason it keeps its position. A host wanting to avoid buffering - for an unsigned request must reject on headers in `authorize/1` first. Stated because "add a - signature check" invites the assumption that it also saves the read. -- **No test asserts the hook runs before `check_headers/3`.** Ordering against `decode/2` is - pinned by the raw-bytes test; ordering against header validation is not, and a refactor could - move it after `check_headers/3` without a red suite. It would still be before `Jason.decode`, - so the raw-bytes guarantee holds — which is why this is recorded rather than blocking. - -## The gate's own rule cost a change, and that is recorded rather than absorbed - -Adding the arity check inline took `init/1` to a cyclomatic complexity of **11** against credo's -limit of **9**: - - [F] Function is too complex (cyclomatic complexity is 11, max is 9). - lib/beam_mcp/transport/http.ex:145:9 #(BeamMCP.Transport.HTTP.init) - -`CONVENTIONS.md`'s first rule — *"A non-zero count is a failure, not a number to hold"* — makes -that a real red rather than a threshold to adjust. The check is kept and extracted into -`validate_authorize_body!/1`, three clauses on the argument shape. Behaviour is identical: `nil` -through, a 2-arity function through, anything else the same `ArgumentError`. - -**And the score above is the re-run, not the first one.** The first table was produced against -tree `0be739ce`; extracting the validator moved the tree, so it was scored again on `cb39add5` -and this record quotes the second. A score from a run on a different tree is not a score for this -one — the defect slice 002 round 7 found in a table headed "on the tree that ships". diff --git a/slices/007-authorize-body/PLAN.md b/slices/007-authorize-body/PLAN.md deleted file mode 100644 index 279ca727..00000000 --- a/slices/007-authorize-body/PLAN.md +++ /dev/null @@ -1,66 +0,0 @@ - - -# Slice 007 — `:authorize_body/2`, so body-signature auth is possible at all - -**Issue:** SCR-292. Written before the code. - -**Number verified free in both places before claiming it**, because SCR-279 records a prior -collision where a directory and an issue disagreed: `slices/` on `main` held `001`, `001b`, -`002`, `003`, `004`, `006`; `005` exists only on PR #15's branch; no `slice/007-*` branch. - -## The defect - -`authorize/1` cannot see the request body. Not awkwardly — structurally: there is no argument -through which the bytes arrive. - - lib/beam_mcp/transport/http.ex:33-34 the contract, (Plug.Conn.t() -> :ok | {:error, term()}) - lib/beam_mcp/transport/http.ex:277 the single call site - lib/beam_mcp/transport/http.ex:275-278 authorize is the third `with` clause; - read_body_bounded is the `do` block - lib/beam_mcp/transport/http.ex:124-126 the init-time arity check it sits beside - -So HMAC or asymmetric verification over the payload cannot be written by any host. - -## The four options, and why option 1 - -1. **Leave `authorize/1`; add an optional post-read hook.** ← chosen -2. Change the arity to `(conn, body)` — **breaking**: every `&Auth.check/1` stops satisfying - `is_function(authorize, 1)` at `:124` and the Plug refuses to start. -3. Keep the arity, pass a conn whose body is read — **breaking invisibly**: unchanged signature, - moved behaviour, and all seven pre-read refusal sites lose `connection: close`. -4. Accept either arity — forces a host to choose one check when the useful configuration is both. - -**Option 1** keeps the property that pays for `authorize/1`'s position: an unauthenticated caller -is refused **before** up to 8 MB is buffered on their behalf. A host that wants both gets both. - -## Constraints - -- Name exactly `:authorize_body`. Not `:verify_signature` — this package performs no - cryptography and naming it so would claim a guarantee it does not provide. -- Optional; validated at `init/1` with `is_function(f, 2)`. Wrong arity is a **startup** failure. -- The second argument is the **raw binary** from `read_body_bounded`, before `Jason.decode`. -- Refusal is opaque: the reason reaches the log, never the caller. - -## Three decisions this forces, to be answered in FINDINGS - -- **(a)** Ordering relative to `check_headers` — it must precede `Jason.decode`. -- **(b)** The refusal status code. -- **(c)** Whether a post-read refusal carries `connection: close`. - -## Acceptance criterion, as a measurement - -1. The raw-bytes guarantee, **demonstrated red first** by handing the hook - `Jason.encode!(Jason.decode!(body))` and quoting the failure. -2. `init/1` refuses a wrong-arity function. -3. A passing check allows execution; a failing check refuses **and the tool does not run**. -4. The refusal leaks nothing — not in the body, not in the headers. -5. Two mutants in `tools/mutants/`, scored by `tools/mutate.sh`, both of which must **KILL**: - one removing the call entirely, one passing a re-encoding. A survivor means the hook is - deletable without a red suite, and that is reported rather than fixed by adjusting the mutant. - -## Out of scope - -All cryptography. Any opinion about what a host should verify. `authorize/1` itself. diff --git a/slices/007-authorize-body/logs/green-raw-bytes.txt b/slices/007-authorize-body/logs/green-raw-bytes.txt deleted file mode 100644 index 3639019a..00000000 --- a/slices/007-authorize-body/logs/green-raw-bytes.txt +++ /dev/null @@ -1,247 +0,0 @@ -=== GREEN: reverted, the hook is handed the raw binary === -$ mix test test/beam_mcp/transport/http_test.exs -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 656740, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -...... -12:31:39.085 [error] ** (RuntimeError) hook exploded: KEY_MATERIAL - test/beam_mcp/transport/http_test.exs:1430: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test :authorize_body/2 — the post-read hook, and the bytes it is handed a hook that raises is a host fault, answered as 500 and told to nobody"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:404: BeamMCP.Transport.HTTP.authorize_body/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:262: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1431: BeamMCP.Transport.HTTPTest."test :authorize_body/2 — the post-read hook, and the bytes it is handed a hook that raises is a host fault, answered as 500 and told to nobody"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -12:31:39.086 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -12:31:39.086 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -12:31:39.087 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -12:31:39.087 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -12:31:39.087 [info] beam_mcp: refused by host authorize_body/2: "SIGNATURE_MISMATCH_FOR_KEY_42" -........ -12:31:39.148 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -12:31:39.215 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:819: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:769: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:711: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:672: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:264: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.............. -12:31:39.268 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -12:31:39.327 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:820: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:769: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:711: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:672: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:264: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -...... -12:31:39.330 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1177: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............ -12:31:39.384 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -12:31:39.385 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -12:31:39.385 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -12:31:39.385 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -. -12:31:39.436 [info] beam_mcp: refused by host authorize_body/2: :bad_signature -. -12:31:39.490 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} -. -12:31:39.490 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -12:31:39.491 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.......... -12:31:39.543 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -...... -12:31:39.595 [info] beam_mcp: refused by host authorize_body/2: :nope -. -12:31:39.602 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:819: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:769: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:711: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:672: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:264: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.... -12:31:39.653 [info] beam_mcp: refused by host authorize/1: :nope -... -Finished in 1.0 seconds (1.0s async, 0.00s sync) -99 tests, 0 failures -TEST_EXIT=0 diff --git a/slices/007-authorize-body/logs/mutation-authorize-body.txt b/slices/007-authorize-body/logs/mutation-authorize-body.txt deleted file mode 100644 index 75d94ef6..00000000 --- a/slices/007-authorize-body/logs/mutation-authorize-body.txt +++ /dev/null @@ -1,15 +0,0 @@ -target: lib/beam_mcp/transport/http.ex -passes: 2 -tree: cb39add5b56542d0d743ce909bd49571396af7f2 dirty=1 -Mab1 | 172 tests, 5 failures TEST_EXIT=2 | 172 tests, 5 failures TEST_EXIT=2 - failed: :authorize_body/2 — the post-read hook, and the bytes it is handed a hook that raises is a host fault, answered as 500 and told to nobody (BeamMCP.Transport.HTTPTest) - failed: :authorize_body/2 — the post-read hook, and the bytes it is handed a passing check allows execution; a failing check refuses (BeamMCP.Transport.HTTPTest) - failed: :authorize_body/2 — the post-read hook, and the bytes it is handed a post-read refusal does NOT close the connection (BeamMCP.Transport.HTTPTest) - failed: :authorize_body/2 — the post-read hook, and the bytes it is handed the hook receives the request body byte-identically, not a re-encoding (BeamMCP.Transport.HTTPTest) - failed: :authorize_body/2 — the post-read hook, and the bytes it is handed the refusal leaks nothing about why to the caller (BeamMCP.Transport.HTTPTest) -Mab2 | 172 tests, 5 failures TEST_EXIT=2 | 172 tests, 5 failures TEST_EXIT=2 - failed: a live listener: what a refusal does to the connection a refusal AFTER the body has been read keeps the connection (BeamMCP.Transport.HTTPBanditTest) - failed: :authorize_body/2 — the post-read hook, and the bytes it is handed the hook receives the request body byte-identically, not a re-encoding (BeamMCP.Transport.HTTPTest) - failed: malformed input answers, rather than crashing an empty body is a parse error, not an exception (BeamMCP.Transport.HTTPTest) - failed: malformed input answers, rather than crashing invalid JSON is a parse error (BeamMCP.Transport.HTTPTest) - failed: the HTTP transport's README claims a refusal before the body read ends the connection, as the README now says (BeamMCP.ReadmeClaimsTest) diff --git a/slices/007-authorize-body/logs/red-raw-bytes.txt b/slices/007-authorize-body/logs/red-raw-bytes.txt deleted file mode 100644 index 7b77895b..00000000 --- a/slices/007-authorize-body/logs/red-raw-bytes.txt +++ /dev/null @@ -1,300 +0,0 @@ -=== RED: the call site temporarily hands the hook Jason.encode!(Jason.decode!(body)) === -$ mix test test/beam_mcp/transport/http_test.exs -Compiling 1 file (.ex) -Generated beam_mcp app -Running ExUnit with seed: 990476, max_cases: 64 - - warning: use Plug.Test is deprecated. Please use `import Plug.Test` and `import Plug.Conn` directly instead. - - │ - 12 │ use Plug.Test - │ ~~~~~~~~~~~~~ - │ - └─ test/beam_mcp/transport/http_test.exs:12: BeamMCP.Transport.HTTPTest (module) - -.. -12:31:24.414 [error] ** (RuntimeError) authorize exploded: bearer s3cr3t-token - test/beam_mcp/transport/http_test.exs:772: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -12:31:24.414 [error] ** (throw) :authorize_threw - test/beam_mcp/transport/http_test.exs:773: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -12:31:24.415 [error] ** (exit) :authorize_exited - test/beam_mcp/transport/http_test.exs:774: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:778: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - (elixir 1.19.2) lib/enum.ex:1688: Enum."-map/2-lists^map/1-1-"/2 - test/beam_mcp/transport/http_test.exs:777: BeamMCP.Transport.HTTPTest."test the whole request path is inside the rescue, not just dispatch a host authorize/1 that raises, throws or exits is answered, not left as a bare 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -12:31:24.415 [info] beam_mcp: refused by host authorize/1: :nope -...... -12:31:24.473 [info] beam_mcp: refused by host authorize/1: %{expected_bearer: "s3cr3t-token", db: "postgres://u:pw@10.0.0.5/prod"} -.. -12:31:24.475 [info] beam_mcp: refused by host authorize_body/2: :nope -... -12:31:24.478 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {SomeOtherModule, :host_fault, :error, %RuntimeError{message: "x"}, []} - -12:31:24.478 [info] beam_mcp: refused by host authorize_body/2: "SIGNATURE_MISMATCH_FOR_KEY_42" - - - 1) test :authorize_body/2 — the post-read hook, and the bytes it is handed the hook receives the request body byte-identically, not a re-encoding (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:1356 - Assertion with == failed - code: assert seen == @odd_body - left: "{\"id\":7,\"jsonrpc\":\"2.0\",\"method\":\"tools/call\",\"params\":{\"arguments\":{},\"name\":\"echo\"}}" - right: "{\"jsonrpc\":\"2.0\" , \"method\":\"tools/call\",\n \"params\":{\"name\":\"echo\",\"arguments\":{}}, \"id\":7}" - stacktrace: - test/beam_mcp/transport/http_test.exs:1375: (test) - -..... -12:31:24.481 [error] ** (Jason.DecodeError) unexpected byte at position 1: 0x6E ("n") - (jason 1.4.5) lib/jason.ex:92: Jason.decode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:262: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:256: BeamMCP.Transport.HTTPTest."test malformed input answers, rather than crashing invalid JSON is a parse error"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 2) test malformed input answers, rather than crashing invalid JSON is a parse error (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:250 - Assertion with == failed - code: assert conn.status == 400 - left: 500 - right: 400 - stacktrace: - test/beam_mcp/transport/http_test.exs:258: (test) - - -12:31:24.482 [error] ** (Jason.EncodeError) invalid byte 0xFF in <<72, 101, 97, 100, 101, 114, 32, 109, 105, 115, 109, 97, 116, 99, 104, 58, 32, 77, 99, 112, 45, 80, 97, 114, 97, 109, 45, 88, 45, 255, 254, 32, 104, 101, 97, 100, 101, 114, 32, 105, 115, 32, 114, 101, 113, 117, 105, 114, 101, 100, 58, 32, 116, 104, 101, 32, 98, 111, 100, 121, 32, 99, 97, 114, 114, 105, 101, 115, 32, 97, 32, 118, 97, 108, 117, 101, 32, 116, 111, 32, 109, 105, 114, 114, 111, 114>> - (jason 1.4.5) lib/jason.ex:164: Jason.encode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1177: BeamMCP.Transport.HTTP.send_json/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1249: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own, raised in transport code, keeps the envelope"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -12:31:24.482 [error] ** (RuntimeError) hook exploded: KEY_MATERIAL - test/beam_mcp/transport/http_test.exs:1430: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test :authorize_body/2 — the post-read hook, and the bytes it is handed a hook that raises is a host fault, answered as 500 and told to nobody"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:404: BeamMCP.Transport.HTTP.authorize_body/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:262: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1431: BeamMCP.Transport.HTTPTest."test :authorize_body/2 — the post-read hook, and the bytes it is handed a hook that raises is a host fault, answered as 500 and told to nobody"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -12:31:24.585 [info] beam_mcp: refused by host authorize_body/2: :bad_signature -....... -12:31:24.739 [error] ** (RuntimeError) host dispatch exploded - test/beam_mcp/transport/http_test.exs:279: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:282: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch answers with a JSON-RPC internal error, not an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -12:31:24.740 [error] ** (throw) :thrown_secret - test/beam_mcp/transport/http_test.exs:383: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - -12:31:24.740 [error] ** (exit) :kaboom_secret - test/beam_mcp/transport/http_test.exs:384: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:389: anonymous fn/2 in BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (elixir 1.19.2) lib/enum.ex:2520: Enum."-reduce/3-lists^foldl/2-0-"/3 - test/beam_mcp/transport/http_test.exs:382: BeamMCP.Transport.HTTPTest."test the host's dispatch failing in ways rescue alone does not catch throw and exit are answered, not left as an empty 500"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -......... -12:31:24.793 [error] ** (Jason.DecodeError) unexpected end of input at position 0 - (jason 1.4.5) lib/jason.ex:92: Jason.decode!/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:262: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:244: BeamMCP.Transport.HTTPTest."test malformed input answers, rather than crashing an empty body is a parse error, not an exception"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - - - - 3) test malformed input answers, rather than crashing an empty body is a parse error, not an exception (BeamMCP.Transport.HTTPTest) - test/beam_mcp/transport/http_test.exs:238 - Assertion with == failed - code: assert conn.status == 400 - left: 500 - right: 400 - stacktrace: - test/beam_mcp/transport/http_test.exs:246: (test) - - -12:31:24.800 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1045: BeamMCP.Transport.HTTPTest.FlakyCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:819: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:769: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:711: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:672: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:264: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1073: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -........ -12:31:24.801 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1324: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1327: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a dispatch crash answers with the request's id, not nil"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -. -12:31:24.801 [error] ** (RuntimeError) SECRET internal detail - test/beam_mcp/transport/http_test.exs:292: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:295: BeamMCP.Transport.HTTPTest."test a crash in the host's dispatch and leaks nothing about the host to the caller"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -12:31:24.806 [error] ** (KeyError) key :input_schema not found in: - - %{name: :echo} - - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:820: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:769: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:711: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:672: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:264: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1183: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host catalog returning a malformed spec answers with the request's id"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -............... -12:31:24.967 [error] ** (RuntimeError) ordinary fault - test/beam_mcp/transport/http_test.exs:1313: anonymous fn/3 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:213: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/server.ex:159: BeamMCP.Server.handle_message/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1147: BeamMCP.Transport.HTTP.do_dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1065: BeamMCP.Transport.HTTP.dispatch/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1314: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us an exception with no status of its own is still answered as -32603"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.......... -12:31:24.972 [error] ** (Plug.BadRequestError) could not process the request due to client error - test/beam_mcp/transport/http_test.exs:1017: anonymous fn/1 in BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:458: BeamMCP.Transport.HTTP.authorize/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:320: BeamMCP.Transport.HTTP.before_body/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:261: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1020: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host authorize/1's exception does not choose the HTTP status either"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -.. -12:31:24.976 [error] ** (throw) :catalog_unavailable - test/beam_mcp/transport/http_test.exs:1094: BeamMCP.Transport.HTTPTest.ThrowingCatalog.all/0 - (beam_mcp 0.3.1) lib/beam_mcp/tool_catalog.ex:29: BeamMCP.ToolCatalog.fetch/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:819: BeamMCP.Transport.HTTP.tool_annotations/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:1120: BeamMCP.Transport.HTTP.host_call/1 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:769: BeamMCP.Transport.HTTP.mirrored_params/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:711: BeamMCP.Transport.HTTP.check_param_headers/4 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:672: BeamMCP.Transport.HTTP.check_headers/3 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:264: BeamMCP.Transport.HTTP.handle/2 - (beam_mcp 0.3.1) lib/beam_mcp/transport/http.ex:227: BeamMCP.Transport.HTTP.call/2 - test/beam_mcp/transport/http_test.exs:1120: BeamMCP.Transport.HTTPTest."test an exception that carries its own HTTP status belongs to the server, not to us a host tool_catalog that THROWS is answered with the id, not just rescued"/1 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:528: ExUnit.Runner.exec_test/2 - (stdlib 7.1) timer.erl:599: :timer.tc/2 - (ex_unit 1.19.2) lib/ex_unit/runner.ex:450: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4 - -..... -12:31:24.977 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: false -... -12:31:25.028 [error] beam_mcp: authorize/1 must return :ok or {:error, reason}, got: {:host_fault, :error, %RuntimeError{message: "x"}, []} -.. -Finished in 1.0 seconds (1.0s async, 0.00s sync) -99 tests, 3 failures -TEST_EXIT=2 diff --git a/test/beam_mcp/readme_claims_test.exs b/test/beam_mcp/readme_claims_test.exs index 0a9948ce..958ad39c 100644 --- a/test/beam_mcp/readme_claims_test.exs +++ b/test/beam_mcp/readme_claims_test.exs @@ -197,7 +197,7 @@ defmodule BeamMCP.ReadmeClaimsTest do "minor and therefore the next documented wire break. That is the defect a " <> "reviewer found in `~> 0.1` during 0.2.0, reproduced one release forward. " <> "Demonstrated before this assertion existed: with the version set to the next " <> - "minor, this file passed green -- see slices/001c-dependency-pin/logs/red.txt." + "minor, this file passed green -- see slice 001c's record `red.txt` (internal)." else # NOT an empty branch. An `if` whose else asserts nothing switches the test off rather # than switching policy, and a lane showed the consequence: at 1.0.0 with a README diff --git a/test/beam_mcp/transport/http_bandit_test.exs b/test/beam_mcp/transport/http_bandit_test.exs index 5e9dcdb7..ed2387e6 100644 --- a/test/beam_mcp/transport/http_bandit_test.exs +++ b/test/beam_mcp/transport/http_bandit_test.exs @@ -8,7 +8,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do Everything else in this suite drives `call/2` through `Plug.Test`, which builds a conn from an in-memory binary: there is no connection, so there is nothing that can be left in a state the next request inherits, and `read_body/2` is a `:binary.part` that can neither block nor fail. - Two gaps in `slices/002-streamable-http/FINDINGS.md` are recorded there as not closable + Two gaps in slice 002's findings (internal) are recorded there as not closable without this instrument. This file stands it up and closes the one the owner scoped in. WHAT IS ACTUALLY WRONG, measured on this tree rather than carried over. A refusal issued @@ -20,7 +20,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do refused, on a path `authorize/1` may leave unauthenticated. Above the cap the drain fails and the connection is dropped with nothing said to the client. - Both halves are measured in `slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt`: + Both halves are measured in slice 003's record `probe-d-bandit-drain-limits.txt` (internal): authorize 403, 9000160-byte body responses=1 socket=closed ...with ** (Bandit.HTTPError) Unable to read remaining data in request body @@ -37,7 +37,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do Slice 002 lane s3 measured `second-request-answered=False` for a pre-read refusal. On bandit 1.12.5 / thousand_island 1.5.0 that does NOT reproduce at ordinary body sizes: the drain succeeds and the second pipelined request IS answered - (`slices/003-release-0-3-1/logs/probe-d-bandit-drain.txt`, three body sizes up to 1 MB, + (slice 003's record `probe-d-bandit-drain.txt` (internal), three body sizes up to 1 MB, all `responses=2`). The defect is real; the symptom named for it was not the one this adapter shows. @@ -119,7 +119,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do # The 9 MB case: the server refuses on the headers, writes a 297-byte 403, and closes with # ~9 MB still unread, so the peer sends an RST. What that RST destroys is the question. # - # `slices/006-harness-honesty/logs/probe-drain-mechanism.txt`, 40 runs per variant, reporting + # slice 006's record `probe-drain-mechanism.txt` (internal), 40 runs per variant, reporting # `{bytes received, recv reason, send result, saw the 403?}`: # # A send everything, then read (what this file did) 29x {297, :closed, :ok, true} @@ -137,7 +137,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do # `show_econnreset: true` only renames the error (B); it does not save the data. # # Reading concurrently with the write (C, D) lost nothing in 80 idle runs. It was NOT enough: - # `slices/006-harness-honesty/logs/probe-rate-mc8-load32-passive.txt` is 40 suites at `--max-cases 8` with 32 busy loops + # slice 006's record `probe-rate-mc8-load32-passive.txt` (internal) is 40 suites at `--max-cases 8` with 32 busy loops # alongside, and 6 of them still ended with `0 complete response(s)` and `0 byte(s) read`. A # PASSIVE socket keeps received bytes inside the port, and a failing `gen_tcp:send` destroys # the port -- so a reader that has not yet been SCHEDULED to call `recv` loses them, which is @@ -157,7 +157,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do # from 11/40 to 3/60 and did not remove it, because the last of it is not on this side of the # wire at all. # - # `slices/006-harness-honesty/logs/probe-loss-site.txt` separates the three places the 297 bytes could go. The plug's + # slice 006's record `probe-loss-site.txt` (internal) separates the three places the 297 bytes could go. The plug's # `authorize` callback messages the test process, so "the server never answered" is # distinguishable from "the answer did not arrive". 60 runs under 32 busy loops: # @@ -167,7 +167,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do # The server decided and wrote its refusal in 60 of 60. Three of those refusals never reached # the client. The server closes with ~9 MB unread, which makes Linux abort the connection with # an RST instead of a FIN, and an RST discards whatever of the response had not yet been - # transmitted. `slices/006-harness-honesty/logs/probe-write-shape.txt` shows the write shape does not govern it either -- + # transmitted. slice 006's record `probe-write-shape.txt` (internal) shows the write shape does not govern it either -- # 120 runs in one 9 MB send lost 0, 120 runs in 64 KB chunks lost 5, on the same loaded machine. # # So the residue is a lost segment, and NO read logic can recover it. What the harness can do @@ -180,7 +180,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do # repeat is announced on stderr rather than hidden. This is not a retry of a failed assertion: # the predicate is protocol-determined -- the connection ended with fewer than `expect` # complete responses -- and it is decided before any assertion runs. A server that genuinely - # never answers fails every attempt and raises, so nothing is masked; `slices/006-harness-honesty/logs/green-mutation-under-load.txt` + # never answers fails every attempt and raises, so nothing is masked; slice 006's record `green-mutation-under-load.txt` (internal) # is the check that says so, with every killed mutant still scoring what the record scores. # # @attempts is derived from the measured loss: 5% at its worst leaves 5 attempts at 3e-7. @@ -300,7 +300,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do # A FIN and an RST are different statements and the harness now reads them as different. The # server closing cleanly having answered nothing is the server saying it has nothing to say: # a measurement, and a damning one. Only an ABORT can destroy a response that was written, - # which is what `slices/006-harness-honesty/logs/probe-loss-reason.txt` measures against the + # which is what slice 006's record `probe-loss-reason.txt` (internal) measures against the # real listener -- every genuine loss arrives as `:econnreset`, never as a clean close. defp unanswered(acc, expect) do """ @@ -557,7 +557,7 @@ defmodule BeamMCP.Transport.HTTPBanditTest do # drain fails, the adapter logs `Unable to read remaining data in request body` and drops # the connection -- pipelined request lost, no `connection: close` in the response that # preceded it. Measured before the fix in - # `slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt`: + # slice 003's record `probe-d-bandit-drain-limits.txt` (internal): # # authorize 403, 9000160-byte body responses=1 socket=closed # diff --git a/test/beam_mcp/transport/http_test.exs b/test/beam_mcp/transport/http_test.exs index c36a3f01..28add261 100644 --- a/test/beam_mcp/transport/http_test.exs +++ b/test/beam_mcp/transport/http_test.exs @@ -1388,7 +1388,7 @@ defmodule BeamMCP.Transport.HTTPTest do # catalog returning MALFORMED DATA -- a spec-shaped map that is not a `%ToolSpec{}` -- # used to raise `KeyError` on the `spec.input_schema` read one line later, escape to # `call/2`'s rescue and answer `id: null`. Measured before the fix, in - # `slices/002-streamable-http/logs/probe-fault-ids.txt`: + # slice 002's record `probe-fault-ids.txt` (internal): # # host catalog RAISES (header validation) 500 -32603 id=4242 # host catalog returns a malformed spec 500 -32603 id=nil @@ -1527,12 +1527,12 @@ defmodule BeamMCP.Transport.HTTPTest do # :binary.part of an in-memory binary. # # Both, twice, with their diffs against the pristine file: - # slices/003-release-0-3-1/logs/mutation-round3.txt and the per-mutant logs beside it. + # slice 003's record `mutation-round3.txt` (internal) and the per-mutant logs beside it. # # So the answer branch is pinned above and the re-raise branch is not. Closing the re-raise # branch needs a Bandit-backed test. Slice 003 stands one up for the `connection: close` # work and still does not close this, because the owner scoped the re-raise pin out of that - # slice; it is recorded in slices/003-release-0-3-1/FINDINGS.md under "Open, recorded rather + # slice; it is recorded in slice 003's findings (internal) under "Open, recorded rather # than fixed", not described here as filed -- the last time this comment said something was # filed, grep found exactly one hit and it was the comment. @@ -1585,7 +1585,7 @@ defmodule BeamMCP.Transport.HTTPTest do # `Jason.encode!(Jason.decode!(body))` rejects every correct signature and presents as a # fault in the host's cryptography rather than in this transport. Demonstrated red before # it passed, by making the call site do exactly that -- see - # slices/007-authorize-body/FINDINGS.md for the failure output. + # slice 007's findings (internal) for the failure output. me = self() o = diff --git a/tools/archive_sweep.sh b/tools/archive_sweep.sh deleted file mode 100755 index 3f54a128..00000000 --- a/tools/archive_sweep.sh +++ /dev/null @@ -1,296 +0,0 @@ -#!/usr/bin/env bash -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# Classify every file the slice record labels an archive: is it its command's bytes, or not? -# -# Written because fixing one archive per round met the next one three rounds running. A list is -# not a population. This derives the population and SHOWS each comparison -- including the -# normalisation it applies -- because a sweep whose whole point is "do not trust a claim, diff -# the bytes" must not assert its own verdicts in an echo. That was r2's round-4 finding 3 -# against the first version of this script, and it was right. -# -# ./tools/archive_sweep.sh > slices/001b-ping-guard/logs/archive-sweep.txt 2>&1 -set -uo pipefail -cd "$(git rev-parse --show-toplevel)" || exit 1 -L=slices/001b-ping-guard/logs -W=$(mktemp -d); trap 'rm -rf "$W"' EXIT - -# Seed and timings differ on every ExUnit run; normalise ONLY those, and say so at each use. -# Normalise ONLY what varies between runs of the same command on the same bytes: -# - the ExUnit seed and the timings, which change every run; -# - the compile prologue, which depends on whether _build was warm and which no archive -# contains. r1 ran this script on a cold build and got a false DIFFERS on full-suite.txt -# (round 5). The build is warmed below as well; this makes the comparison independent of -# build state rather than merely usually-right, so the header's command reproduces the -# tracked output on a clean checkout. -# Nothing else is touched -- in particular nothing inside a failure block. -norm() { - sed -E 's/seed: [0-9]+/seed: N/; s/in [0-9.]+ seconds/in T seconds/; s/\([0-9.]+s async, [0-9.]+s sync\)/(T async, T sync)/' "$1" \ - | grep -Ev '^(==> |Compiling [0-9]+ file|Generated .* app)' -} - -# Two notes, not one. The first version took a single note and printed it on both branches, -# so a failing line read "DIFFERS (empty diff above = identical)" -- a parenthetical asserting -# a result the run had just contradicted. A printed claim the run did not compute is the exact -# defect this instrument exists to catch, and it was inside the instrument (r2 round-5, 2a). -# -# THE VERDICT NOW REACHES THE EXIT STATUS. Until this was fixed a DIFFERS printed and the -# script exited 0, so anything reading the status -- which is what wiring this into gate.sh or -# CI would do -- read a clean sweep over archives the run had just shown did not match. -# Measured on 31bcbff: three of thirteen verdicts were DIFFERS and SWEEP_EXIT was 0. -# -# AND THE VERDICT RECORDS THE PATH IT CLASSIFIED, not merely that one more file was classified. -# The closing tally compared two integers under the words "every enumerated file is classified", -# which is a claim about names. A rename inside the population leaves both integers unchanged, -# and the tally then read BALANCES over a file classified by nothing -- while handing a verdict -# to a file that no longer existed (tools/probe_archive_tally.sh). -SWEEP_FAIL=0 -verdict() { # verdict - printf '%s\n' "$1" >> "$W/classified" - if [ "$2" -eq 0 ]; then printf ' => %-24s RAW %s\n' "$(basename "$1")" "$3" - else printf ' => %-24s DIFFERS %s\n' "$(basename "$1")" "${4:-see the diff above}" - SWEEP_FAIL=1 - fi -} - -# A third outcome, and it is not a pass. gate.sh's header says a step that cannot measure -# something says so rather than passing; the same rule holds here. UNCHECKED records the name -- -# so the file is not ALSO reported as unclassified, which would be two complaints about one -# gap -- and it fails the run. -unchecked() { # unchecked - printf '%s\n' "$1" >> "$W/classified" - printf ' => %-24s UNCHECKED %s\n' "$(basename "$1")" "$2" - SWEEP_FAIL=1 -} - -# Authored files are classified too, by being named as authored. One list, so the closing tally -# compares one set against one set rather than adding two counters and hoping. -authored() { # authored - printf '%s\n' "$1" >> "$W/classified" - printf '%s\n' "$1" >> "$W/authored" - printf ' %-28s written by its own reviewer lane; not a command capture\n' "$(basename "$1")" -} - -# An empty diff and a diff that never ran are indistinguishable on the page. So report the -# comparison POSITIVELY -- the differing-line count and the exit code -- rather than printing -# nothing and calling it agreement. A check that did not execute cannot then render as a pass. -showdiff() { # showdiff -> returns diff's rc - local out rc - out=$(diff "$1" "$2"); rc=$? - printf ' comparison: %s differing line(s), diff exit=%s\n' "$(printf '%s' "$out" | grep -c '^[<>]')" "$rc" - [ -n "$out" ] && printf '%s\n' "$out" | sed 's/^/ /' - return $rc -} - -# The marks a filtered capture cannot have. Used for logs that cannot be re-run here. -marks() { # marks -> prints counts, returns 0 if all four present - local f="$1" banner stack code fin - banner=$(grep -c 'Running ExUnit with seed' "$f"); stack=$(grep -c 'stacktrace:' "$f") - code=$(grep -c 'code:' "$f"); fin=$(grep -c 'Finished in' "$f") - printf ' seed banner : %s\n stacktrace: : %s\n code: : %s\n Finished in : %s\n' \ - "$banner" "$stack" "$code" "$fin" - printf ' tests, line : %s\n' "$(grep 'tests,' "$f")" - # ALL FOUR are enforced, not merely printed. The first version tested only two, so a log - # stripped of its ExUnit banner -- instance #2 exactly -- still scored RAW (r2 round-5, 3). - [ "$banner" -ge 1 ] && [ "$stack" -ge 1 ] && [ "$code" -ge 1 ] && [ "$fin" -ge 1 ] -} - -echo "=== POPULATION, derived from the tracked set rather than listed ===" -git ls-files -- "$L/*" | sed 's/^/ /' -echo -echo "Two kinds of file live here, and only one kind can be diffed against a command:" -echo " CAPTURES - a command wrote them; re-run the command and compare bytes." -echo " Includes the spec-*.md files: 'curl -o' IS the command and the" -echo " upstream page IS the source, so they are checkable, not prose." -echo " AUTHORED - the round*.md lane reports. Each was written by the reviewer that" -echo " is its source. Nothing to re-run; they must simply never be" -echo " labelled the output of a command." -echo -# Warm the build BEFORE any comparison, and say so. Without this the first `mix test` hits a -# cold _build and emits "Compiling N files (.ex)" lines that norm() does not touch, scoring a -# false DIFFERS that depends only on the machine the sweep ran on. The first version passed -# purely because gate.sh happened to run --force earlier in the file: the ordering was -# load-bearing and undocumented (r2 round-5, 2b). -echo "=== warming the build so comparisons do not depend on _build state ===" -echo " \$ mix compile --force ; mix test --exclude all (output discarded; only the" -echo " build state matters here, and a cold build emits compile lines no archive contains)" -mix compile --force > /dev/null 2>&1 -mix test --exclude test > /dev/null 2>&1 -echo - -echo "=== CAPTURES: test and gate logs ===" -echo "-- full-suite.txt: diff vs a fresh 'mix test', seed+timing normalised on BOTH sides --" -mix test > "$W/full.out" 2>&1 -showdiff <(norm "$W/full.out") <(norm "$L/full-suite.txt"); rc=$? -verdict "$L/full-suite.txt" $rc "(0 differing lines above; seed/timing/compile normalised)" "(the diff above is the difference)" -echo -echo "-- green-negotiation.txt: same command, same normalisation --" -mix test test/beam_mcp/negotiation_test.exs > "$W/green.out" 2>&1 -showdiff <(norm "$W/green.out") <(norm "$L/green-negotiation.txt"); rc=$? -verdict "$L/green-negotiation.txt" $rc "(0 differing lines above)" "(the diff above is the difference)" -echo -echo "-- gate.txt: no normalisation, the gate emits nothing variable --" -./tools/gate.sh > "$W/gate.out" 2>&1 -showdiff "$W/gate.out" "$L/gate.txt"; rc=$? -verdict "$L/gate.txt" $rc "(0 differing lines above; no normalisation applied)" "(the diff above is the difference)" -echo -echo "=== CAPTURES: the probe ===" -echo "-- probe-after.txt vs a WARM fresh run of the tracked probe, no normalisation --" -mix run tools/probe_ping.exs > "$W/probe.out" 2>&1 -showdiff "$W/probe.out" "$L/probe-after.txt"; rc=$? -verdict "$L/probe-after.txt" $rc "(byte-identical to a warm run)" "(the diff above is the difference)" -echo " NOTE, and the direction matters: against a COLD _build the same command emits extra" -echo " dependency-compile lines, so the archive would have FEWER lines than that run." -echo " Fewer-lines-than-the-run is the SIGNATURE OF FILTERING -- it is exactly what was" -echo " found in instances #2 and #3 -- so it is never on its own an acquittal. What" -echo " acquits this file is the byte-identical match against a warm run above." -echo -echo "=== CAPTURES: red.txt, the red half of red-before-green ===" -echo " RESTORED in round 6. The round-4 sweep classified this file; the round-5 rewrite" -echo " enumerated it and classified it nowhere, so a reader scanning for DIFFERS got a clean" -echo " bill over a population the instrument had not finished. An unclassified file is not a" -echo " RAW file. That is CONVENTIONS.md's 'proves nothing, and proves it quietly' shape, and" -echo " it is the coverage regression r2 blocked round 5 on -- inside the round that promised" -echo " the population." -echo " Not re-runnable here: it is the failing state BEFORE the fix, and lib/ is now fixed." -echo " Reproducing it needs lib/beam_mcp/server.ex reverted to base/main, which this script" -echo " must not do to the working tree. Checked instead for the marks a filtered capture" -echo " cannot have:" -if marks "$L/red.txt"; then - verdict "$L/red.txt" 0 "(banner + code: + stacktrace: + Finished in, all present)" "" -else - verdict "$L/red.txt" 1 "" "(a mark is missing; a filtered capture would look like this)" -fi -echo - -echo "=== CAPTURES: the two mutation logs ===" -for m in a b; do - f="$L/mutation-$m.txt" - echo "-- mutation-$m.txt --" - echo " not re-run here: reproducing it needs a mutated copy of lib/, which this script" - echo " must not create in the working tree. Checked instead for the marks a filtered" - echo " capture cannot have -- the ExUnit banner and a complete failure body:" - if marks "$f"; then - verdict "$f" 0 "(banner + code: + stacktrace: + Finished in, all present)" "" - else - verdict "$f" 1 "" "(a mark is missing; a filtered capture would look like this)" - fi -done -echo -echo "=== CAPTURES: the README-claim mutation logs ===" -echo " Same treatment as the mutation logs above and for the same reason: reproducing them" -echo " needs a mutated README or lib/, which this script must not create in the working tree." -for m in a b; do - f="$L/mutation-readme-$m.txt" - [ -f "$f" ] || continue - echo "-- mutation-readme-$m.txt --" - if marks "$f"; then - verdict "$f" 0 "(banner + code: + stacktrace: + Finished in, all present)" "" - else - verdict "$f" 1 "" "(a mark is missing; a filtered capture would look like this)" - fi -done -echo - -echo "=== CAPTURES: the three specification pages, re-fetched and diffed against upstream ===" -echo "These are the only files whose source lives OUTSIDE the tree, so they are the only" -echo "ones a diff can check against an independent authority. Grouping them with prose" -echo "(the first version of this script did) is what would excuse never checking them." -fetch_check() { # fetch_check - if curl -sSL --fail "$2" -o "$W/$(basename $1)" 2>/dev/null; then - showdiff "$W/$(basename $1)" "$1"; rc=$? - verdict "$1" $rc "(re-fetched from $2)" "(the diff above is the difference)" - else - unchecked "$1" "(fetch failed; offline -- NOT a pass, and it fails this run)" - fi -} -fetch_check "$L/spec-basic-versioning.md" "https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning.md" -fetch_check "$L/spec-changelog.md" "https://modelcontextprotocol.io/specification/2026-07-28/changelog.md" -fetch_check "$L/spec-legacy-basic.md" "https://modelcontextprotocol.io/specification/2025-11-25/basic.md" -echo -echo "=== AUTHORED: the lane reports ===" -for f in $(git ls-files -- "$L/round*.md"); do - authored "$f" -done -echo -echo "=== archive-sweep.txt itself ===" -echo " A file cannot diff itself while being written, so this entry NAMES ITS CHECK rather" -echo " than asserting a conclusion -- the thing this script's own header forbids:" -printf ' script sha256 : %s\n' "$(sha256sum tools/archive_sweep.sh | cut -d" " -f1)" -printf ' reproduce : ./tools/archive_sweep.sh > %s 2>&1\n' "$L/archive-sweep.txt" -echo " then diff that against the tracked file. A reader who doubts any verdict above" -echo " re-runs that one line; the script is tracked, so the bytes that produced this" -echo " output are in the tree next to it." -verdict "$L/archive-sweep.txt" 0 "(self: named check above, not an assertion)" "" -echo - -echo "=== CLOSING TALLY -- names, because counts were the loophole ===" -echo " Round 5 enumerated red.txt and classified it nowhere: 19 listed, 18 classified, and" -echo " the output still read as a clean sweep because nothing counted. A file could drop out" -echo " QUIETLY -- CONVENTIONS.md's own worst shape, and this script's header says a list is" -echo " not a population." -echo -echo " Counting closed one shape and left another. 'Every enumerated file is classified' is a" -echo " claim about NAMES, and two integers cannot carry it: rename one file inside the" -echo " population and the loop above still hands a verdict to the name that left, so both" -echo " integers are unchanged and the tally reads BALANCES over a file nothing looked at." -echo " Measured, not imagined -- ./tools/probe_archive_tally.sh renames mutation-a.txt to" -echo " mutation-c.txt and the counting version printed 'enumerated : 29 / classified : 29 /" -echo " TALLY BALANCES' while giving mutation-a.txt a verdict though the file did not exist." -echo -echo " So the comparison is now between two SETS OF PATHS, printed in BOTH directions." -echo " The second direction is the one a counter can never see." -git ls-files -- "$L/*" | sort > "$W/enumerated" -touch "$W/classified" "$W/authored" -sort "$W/classified" > "$W/classified.sorted" -sort -u "$W/classified" > "$W/classified.uniq" -ENUM=$(wc -l < "$W/enumerated") -CLS=$(wc -l < "$W/classified.uniq") -AUTH=$(sort -u "$W/authored" | wc -l) -printf ' enumerated : %s\n classified : %s (%s verdicts + %s authored lane reports)\n' \ - "$ENUM" "$CLS" "$((CLS - AUTH))" "$AUTH" - -tally_bad=0 -missing=$(comm -23 "$W/enumerated" "$W/classified.uniq") -extra=$(comm -13 "$W/enumerated" "$W/classified.uniq") -dupes=$(uniq -d "$W/classified.sorted") -if [ -n "$missing" ]; then - tally_bad=1 - echo " => ENUMERATED BUT NOT CLASSIFIED -- unclassified is NOT the same as RAW:" - printf '%s\n' "$missing" | sed 's/^/ /' -fi -if [ -n "$extra" ]; then - tally_bad=1 - echo " => CLASSIFIED BUT NOT ENUMERATED -- a verdict was printed for a path that is not in" - echo " the population. Either the file left the tracked set or a hand-written loop names" - echo " something that does not exist:" - printf '%s\n' "$extra" | sed 's/^/ /' -fi -if [ -n "$dupes" ]; then - tally_bad=1 - echo " => CLASSIFIED TWICE -- one file cannot answer for two:" - printf '%s\n' "$dupes" | sed 's/^/ /' -fi -if [ "$tally_bad" -eq 0 ]; then - echo " => TALLY BALANCES: the classified set and the enumerated set are the same names." -else - echo " Do not read this sweep as clean." - SWEEP_FAIL=1 -fi -echo - -# The exit status is the sweep's verdict, and until this line existed it was not. A DIFFERS -# printed and the script exited 0. -echo "=== EXIT STATUS ===" -if [ "$SWEEP_FAIL" -eq 0 ]; then - echo " SWEEP OK: every enumerated file is classified by name, and every classification is RAW." - exit 0 -else - echo " SWEEP FAILED: at least one DIFFERS, UNCHECKED, or tally mismatch above." - echo " A DIFFERS is not by itself evidence of fabrication. This script re-runs each command" - echo " against the CURRENT tree, so an archive captured at an earlier tree differs because" - echo " the tree moved. What the exit status now says is 'a human must read this', which is" - echo " what it always should have said and did not." - exit 1 -fi diff --git a/tools/gate.sh b/tools/gate.sh index 7dfb3a9f..7cea6cb6 100755 --- a/tools/gate.sh +++ b/tools/gate.sh @@ -411,7 +411,7 @@ done # below are root-anchored: a nested `lib/.internal/` is neither ignored nor detected. internal_dir=".internal" allowlist="tools/publication-allowlist.txt" -allowlist_sha="ee5dc25859a7ccc153b25a1216ba65abfa3d576117d5b7c327e9b37296dde5c3" +allowlist_sha="75e2d09087c73b87dc7201a7bce548736c9b41bb0adbc1d172efe0eaac6ae351" pub_fail=0 # TWO QUESTIONS, TWO COMMANDS. `-q` answers "is the path ignored?" with its exit status alone. # `-v` answers "which rule matched?" -- and under -v the exit status means something else: diff --git a/tools/measure_body.exs b/tools/measure_body.exs index a307b4bc..8bbef6c4 100644 --- a/tools/measure_body.exs +++ b/tools/measure_body.exs @@ -3,7 +3,7 @@ # # Settles the README's read-before-refusal sentence by measuring the two quantities it used to # state as one. Run with `mix run tools/measure_body.exs`; the archive it produced is -# slices/002-streamable-http/logs/measure-read-before-refusal.txt. +# slice 002's record `measure-read-before-refusal.txt` (internal). # # The sentence has been wrong twice -- first a single exact byte count no lane could reproduce, # then a 1.02-1.50 MiB range attributed to the client's send buffer. It is a script rather than diff --git a/tools/mutants/M13rev.py b/tools/mutants/M13rev.py index 36ffb60f..e4e82fbd 100644 --- a/tools/mutants/M13rev.py +++ b/tools/mutants/M13rev.py @@ -5,7 +5,7 @@ # a path here: a mutant that names one machine's worktree is the unresolvable # `$S/mut.sh` that slice 003's record cites, in another file. # M13rev -- the (c) fix removed: `spec.input_schema` and the annotation walk go back OUTSIDE -# `host_call/1`, which is exactly mutant M13 from slices/002-streamable-http/logs/mutation-round7.txt. +# `host_call/1`, which is exactly mutant M13 from slice 002's record `mutation-round7.txt` (internal). import io import sys p = sys.argv[1] diff --git a/tools/probe_archive_tally.sh b/tools/probe_archive_tally.sh deleted file mode 100755 index 48d0417d..00000000 --- a/tools/probe_archive_tally.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env bash -# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC -# SPDX-License-Identifier: Apache-2.0 -# -# Probe: does tools/archive_sweep.sh's closing tally compare NAMES, or only COUNTS? -# -# The tally exists because round 5 enumerated a file and classified it nowhere. It closes that -# hole for one shape only -- a file that raises the enumerated count -- and leaves open the -# shape where one file leaves the population and another takes its classification slot. The -# counts then balance and the sweep reports a complete pass over a population it did not finish. -# -# The plant is a `git mv` and not a `cp`, because the tally derives its population from -# -# git ls-files -- "slices/001b-ping-guard/logs/*" -# -# and an untracked file is invisible to that command. Planting outside the population is -# CONVENTIONS.md's first recorded derivation failure, reproduced here on purpose in reverse: -# this probe proves it is planting INSIDE the population by printing the population before and -# after the plant, from that same command. -# -# Untracked files elsewhere in the tree are therefore irrelevant to this probe and are not a -# reason to refuse -- `git ls-files` does not see them. Modified or staged TRACKED files are, -# because the plant and its reversal are themselves tracked operations. -# -# ./tools/probe_archive_tally.sh > slices/004-gate-honesty/logs/probe-archive-tally.txt 2>&1 -set -uo pipefail -cd "$(git rev-parse --show-toplevel)" || exit 1 - -L=slices/001b-ping-guard/logs -SRC="$L/mutation-a.txt" -DST="$L/mutation-c.txt" - -dirty=$(git status --porcelain | grep -v '^?? ') -if [ -n "$dirty" ]; then - echo "REFUSED: tracked files are modified or staged. This probe renames a tracked file and" - echo "puts it back; it will not do that over changes it did not make." - printf '%s\n' "$dirty" | sed 's/^/ /' - exit 2 -fi - -planted=0 -restore() { - if [ "$planted" -eq 1 ] && [ -e "$DST" ]; then - git mv "$DST" "$SRC" >/dev/null 2>&1 || mv "$DST" "$SRC" - fi - echo - echo "=== cleanup: the plant is reverted and the tree is asserted clean ===" - local left - left=$(git status --porcelain | grep -v '^?? ') - if [ -z "$left" ]; then - echo " git status --porcelain (tracked): empty. The tree is as it was." - else - echo " NOT CLEAN -- revert by hand:" - printf '%s\n' "$left" | sed 's/^/ /' - fi -} -trap restore EXIT - -echo "=== the population, as the tally derives it, BEFORE the plant ===" -echo " \$ git ls-files -- \"$L/*\" | wc -l" -printf ' %s\n' "$(git ls-files -- "$L/*" | wc -l)" -echo " \$ git ls-files -- \"$L/mutation-*\"" -git ls-files -- "$L/mutation-*" | sed 's/^/ /' -echo - -echo "=== the plant: a tracked rename inside that population ===" -echo " \$ git mv $SRC $DST" -git mv "$SRC" "$DST" || { echo " git mv failed"; exit 2; } -planted=1 -echo - -echo "=== the population AFTER the plant, from the same command ===" -echo " \$ git ls-files -- \"$L/*\" | wc -l" -printf ' %s\n' "$(git ls-files -- "$L/*" | wc -l)" -echo " \$ git ls-files -- \"$L/mutation-*\"" -git ls-files -- "$L/mutation-*" | sed 's/^/ /' -echo -echo " The count is unchanged. mutation-c.txt is enumerated and is classified by nothing:" -echo " the sweep's mutation loop is \`for m in a b\`, so it still calls verdict() for the" -echo " now-absent mutation-a.txt. One file left the population, another took its slot, and" -echo " the two counts the tally compares are both unchanged." -echo - -echo "=== ./tools/archive_sweep.sh under the plant ===" -W=$(mktemp -d); trap 'rm -rf "$W"; restore' EXIT -./tools/archive_sweep.sh > "$W/sweep.out" 2>&1 -rc=$? -echo " SWEEP_EXIT=$rc" -echo -echo " -- every verdict line --" -grep -E '^ => ' "$W/sweep.out" | sed 's/^/ /' -echo -echo " -- the closing tally, verbatim --" -sed -n '/CLOSING TALLY/,$p' "$W/sweep.out" | sed 's/^/ /' -echo -echo " -- is mutation-c.txt CLASSIFIED anywhere? Count verdict lines, not mentions: the" -echo " file is named once by the population echo at the top of the sweep, and a mention" -echo " is not a classification -- which is the distinction this whole probe is about. --" -echo " \$ grep -c '=> .*mutation-c' " -printf ' %s\n' "$(grep -c '=> .*mutation-c' "$W/sweep.out")" -echo " -- and is mutation-a.txt still given a verdict, though it does not exist? --" -echo " \$ grep '=> .*mutation-a' " -grep '=> .*mutation-a' "$W/sweep.out" | sed 's/^/ /' -echo -echo "=== VERDICT OF THIS PROBE ===" -echo " A tally that compares names must FAIL here and name both directions:" -echo " mutation-c.txt enumerated, classified nowhere" -echo " mutation-a.txt classified, no longer enumerated" -echo " A tally that compares counts reports TALLY BALANCES and exits 0." -echo " Read the two lines above, not this sentence." diff --git a/tools/publication-allowlist.txt b/tools/publication-allowlist.txt index f2b6970f..37a9a785 100644 --- a/tools/publication-allowlist.txt +++ b/tools/publication-allowlist.txt @@ -1,249 +1,8 @@ # SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC # SPDX-License-Identifier: Apache-2.0 # -# Paths under slices/ that were already tracked when the publication step of tools/gate.sh -# was added. Generated, not typed: git ls-files -- slices/ | LC_ALL=C sort +# Paths under slices/ allowed in the public tree. None, from 2026-09-23: the archive that was +# grandfathered here (243 files, slices 001 to 007) moved to the team's internal records, byte +# for byte, and the public tree keeps SLICES.md, what each slice committed, instead. The +# publication step of tools/gate.sh refuses any tracked path under slices/ not listed here. # The gate pins this file by sha256. Editing it is a gate edit, and reads as one in the diff. -slices/001-revision-negotiation/PLAN.md -slices/001b-ping-guard/FINDINGS.md -slices/001b-ping-guard/PLAN.md -slices/001b-ping-guard/REVIEW.md -slices/001b-ping-guard/logs/archive-sweep.txt -slices/001b-ping-guard/logs/full-suite.txt -slices/001b-ping-guard/logs/gate.txt -slices/001b-ping-guard/logs/green-negotiation.txt -slices/001b-ping-guard/logs/mutation-a.txt -slices/001b-ping-guard/logs/mutation-b.txt -slices/001b-ping-guard/logs/mutation-readme-a.txt -slices/001b-ping-guard/logs/mutation-readme-b.txt -slices/001b-ping-guard/logs/probe-after.txt -slices/001b-ping-guard/logs/red.txt -slices/001b-ping-guard/logs/round1.r1.md -slices/001b-ping-guard/logs/round1.r2.md -slices/001b-ping-guard/logs/round2.r1.md -slices/001b-ping-guard/logs/round2.r2.md -slices/001b-ping-guard/logs/round3.r1.md -slices/001b-ping-guard/logs/round3.r2.md -slices/001b-ping-guard/logs/round4.r1.md -slices/001b-ping-guard/logs/round4.r2.md -slices/001b-ping-guard/logs/round5.r1.md -slices/001b-ping-guard/logs/round5.r2.md -slices/001b-ping-guard/logs/round6.r1.md -slices/001b-ping-guard/logs/round6.r2.md -slices/001b-ping-guard/logs/round7.r1.md -slices/001b-ping-guard/logs/round7.r2.md -slices/001b-ping-guard/logs/round8.r1.md -slices/001b-ping-guard/logs/round8.r2.md -slices/001b-ping-guard/logs/spec-basic-versioning.md -slices/001b-ping-guard/logs/spec-changelog.md -slices/001b-ping-guard/logs/spec-legacy-basic.md -slices/002-streamable-http/FINDINGS.md -slices/002-streamable-http/PLAN.md -slices/002-streamable-http/logs/full-suite.txt -slices/002-streamable-http/logs/gate-blockers-fixed.txt -slices/002-streamable-http/logs/gate-body-cap-measured.txt -slices/002-streamable-http/logs/gate-release.txt -slices/002-streamable-http/logs/gate-round2.txt -slices/002-streamable-http/logs/gate-round3.txt -slices/002-streamable-http/logs/gate-round5-file-fixes.txt -slices/002-streamable-http/logs/gate-round5-fixes.txt -slices/002-streamable-http/logs/gate-round6.txt -slices/002-streamable-http/logs/gate-round7.txt -slices/002-streamable-http/logs/gate.txt -slices/002-streamable-http/logs/green-cacheable-fields.txt -slices/002-streamable-http/logs/green-host-exception-envelope.txt -slices/002-streamable-http/logs/green-integer-comparison.txt -slices/002-streamable-http/logs/green-leading-zeros.txt -slices/002-streamable-http/logs/keepalive.txt -slices/002-streamable-http/logs/measure-read-before-refusal.txt -slices/002-streamable-http/logs/mutation-round6.txt -slices/002-streamable-http/logs/mutation-round7.txt -slices/002-streamable-http/logs/mutation.md -slices/002-streamable-http/logs/probe-docs-gate.txt -slices/002-streamable-http/logs/probe-fault-ids.txt -slices/002-streamable-http/logs/red-host-exception-envelope.txt -slices/002-streamable-http/logs/red-host-population.txt -slices/002-streamable-http/logs/red-integer-comparison.txt -slices/002-streamable-http/logs/red-leading-zeros.txt -slices/002-streamable-http/logs/red-no-cacheable-fields.txt -slices/002-streamable-http/logs/red-no-endpoint.txt -slices/002-streamable-http/logs/red-required-options.txt -slices/002-streamable-http/logs/resilience.txt -slices/002-streamable-http/logs/round1.r1.md -slices/002-streamable-http/logs/round1.r2.md -slices/002-streamable-http/logs/round1.s1.md -slices/002-streamable-http/logs/round2.r1.md -slices/002-streamable-http/logs/round2.r2.md -slices/002-streamable-http/logs/round2.s1.md -slices/002-streamable-http/logs/round3.r1.md -slices/002-streamable-http/logs/round3.r1.tree -slices/002-streamable-http/logs/round3.r2.md -slices/002-streamable-http/logs/round3.r2.tree -slices/002-streamable-http/logs/round3.s1.md -slices/002-streamable-http/logs/round3.s1.tree -slices/002-streamable-http/logs/round4.r1.tree -slices/002-streamable-http/logs/round4.r2.tree -slices/002-streamable-http/logs/round4.s1.md -slices/002-streamable-http/logs/round4.s1.tree -slices/002-streamable-http/logs/spec-basic-versioning.md -slices/002-streamable-http/logs/spec-changelog.md -slices/002-streamable-http/logs/spec-legacy-basic.md -slices/002-streamable-http/logs/spec-streamable-http.md -slices/003-release-0-3-1/FINDINGS.md -slices/003-release-0-3-1/PLAN.md -slices/003-release-0-3-1/logs/baseline-c-tests.txt -slices/003-release-0-3-1/logs/baseline-tests.txt -slices/003-release-0-3-1/logs/flake-check-bandit.txt -slices/003-release-0-3-1/logs/gate-a.txt -slices/003-release-0-3-1/logs/gate-b.txt -slices/003-release-0-3-1/logs/gate-baseline.txt -slices/003-release-0-3-1/logs/gate-c-baseline.txt -slices/003-release-0-3-1/logs/gate-c.txt -slices/003-release-0-3-1/logs/gate-d.txt -slices/003-release-0-3-1/logs/gate-rebased.txt -slices/003-release-0-3-1/logs/gate-release.txt -slices/003-release-0-3-1/logs/gate-round1.txt -slices/003-release-0-3-1/logs/gate-round2.txt -slices/003-release-0-3-1/logs/gate-round3.txt -slices/003-release-0-3-1/logs/green-a-nonprimitive.txt -slices/003-release-0-3-1/logs/green-b-collision.txt -slices/003-release-0-3-1/logs/green-c-lost-id.txt -slices/003-release-0-3-1/logs/green-d-connection-close.txt -slices/003-release-0-3-1/logs/green-e-invalid-utf8.txt -slices/003-release-0-3-1/logs/green-readme-claims.txt -slices/003-release-0-3-1/logs/measure-version-requirement.txt -slices/003-release-0-3-1/logs/mutation-c-M13rev.txt -slices/003-release-0-3-1/logs/mutation-c-M2always.txt -slices/003-release-0-3-1/logs/mutation-c-M2never.txt -slices/003-release-0-3-1/logs/mutation-c-Mc2.txt -slices/003-release-0-3-1/logs/mutation-c-Mc3.txt -slices/003-release-0-3-1/logs/mutation-d-Md1.txt -slices/003-release-0-3-1/logs/mutation-d-Md2.txt -slices/003-release-0-3-1/logs/mutation-r-Mr1.txt -slices/003-release-0-3-1/logs/mutation-r-Mr2.txt -slices/003-release-0-3-1/logs/mutation-rebased.txt -slices/003-release-0-3-1/logs/mutation-round3.M13rev.txt -slices/003-release-0-3-1/logs/mutation-round3.M2always.txt -slices/003-release-0-3-1/logs/mutation-round3.M2never.txt -slices/003-release-0-3-1/logs/mutation-round3.Mc2.txt -slices/003-release-0-3-1/logs/mutation-round3.Mc3.txt -slices/003-release-0-3-1/logs/mutation-round3.Md1.txt -slices/003-release-0-3-1/logs/mutation-round3.Md2.txt -slices/003-release-0-3-1/logs/mutation-round3.Mr1.txt -slices/003-release-0-3-1/logs/mutation-round3.Mr2.txt -slices/003-release-0-3-1/logs/mutation-round3.txt -slices/003-release-0-3-1/logs/probe-d-bandit-drain-limits.txt -slices/003-release-0-3-1/logs/probe-d-bandit-drain.txt -slices/003-release-0-3-1/logs/probe-d-large-body-reset.txt -slices/003-release-0-3-1/logs/red-a-nonprimitive.txt -slices/003-release-0-3-1/logs/red-b-collision.txt -slices/003-release-0-3-1/logs/red-c-lost-id.txt -slices/003-release-0-3-1/logs/red-d-connection-close.txt -slices/003-release-0-3-1/logs/red-e-invalid-utf8.txt -slices/003-release-0-3-1/logs/red-readme-claims.txt -slices/003-release-0-3-1/logs/round1.a.md -slices/003-release-0-3-1/logs/round1.a.tree -slices/003-release-0-3-1/logs/round1.b.md -slices/003-release-0-3-1/logs/round1.b.tree -slices/003-release-0-3-1/logs/round2.a.md -slices/003-release-0-3-1/logs/round2.a.tree -slices/003-release-0-3-1/logs/round2.b.md -slices/003-release-0-3-1/logs/round2.b.tree -slices/003-release-0-3-1/logs/round3.a.md -slices/003-release-0-3-1/logs/round3.a.tree -slices/003-release-0-3-1/logs/round3.b.md -slices/003-release-0-3-1/logs/round3.b.tree -slices/004-gate-honesty/FINDINGS.md -slices/004-gate-honesty/PLAN.md -slices/004-gate-honesty/logs/gate-after-coverage.txt -slices/004-gate-honesty/logs/gate-baseline.txt -slices/004-gate-honesty/logs/gate-red-before-coverage.txt -slices/004-gate-honesty/logs/gate-round3.txt -slices/004-gate-honesty/logs/mutation-m1.txt -slices/004-gate-honesty/logs/mutation-m2.txt -slices/004-gate-honesty/logs/mutation-m3.txt -slices/004-gate-honesty/logs/probe-archive-tally-after.txt -slices/004-gate-honesty/logs/probe-archive-tally-before.txt -slices/004-gate-honesty/logs/probe-gate-honesty-after.txt -slices/004-gate-honesty/logs/probe-gate-honesty-before.txt -slices/004-gate-honesty/logs/probe-gate-honesty-round2.txt -slices/004-gate-honesty/logs/probe-gate-honesty-round3.txt -slices/004-gate-honesty/logs/probe-signoff.txt -slices/004-gate-honesty/logs/red-reuse-population.txt -slices/004-gate-honesty/logs/red-sidecar-untracked.txt -slices/004-gate-honesty/logs/red-signoff-records-unheadered.txt -slices/004-gate-honesty/logs/round1-bash32-simulation.txt -slices/004-gate-honesty/logs/round1.r1.md -slices/004-gate-honesty/logs/round1.r1.tree -slices/004-gate-honesty/logs/round1.r2.md -slices/004-gate-honesty/logs/round1.r2.tree -slices/004-gate-honesty/logs/round2.r1.md -slices/004-gate-honesty/logs/round2.r1.tree -slices/004-gate-honesty/logs/round2.r2.md -slices/004-gate-honesty/logs/round2.r2.tree -slices/004-gate-honesty/logs/round3.r1.md -slices/004-gate-honesty/logs/round3.r1.tree -slices/004-gate-honesty/logs/round3.r2.md -slices/004-gate-honesty/logs/round3.r2.tree -slices/004-gate-honesty/logs/sweep-after.txt -slices/004-gate-honesty/logs/sweep-baseline.txt -slices/004-gate-honesty/signoff/round1.r1.signoff -slices/004-gate-honesty/signoff/round1.r2.signoff -slices/004-gate-honesty/signoff/round2.r1.signoff -slices/004-gate-honesty/signoff/round2.r2.signoff -slices/004-gate-honesty/signoff/round3.r1.signoff -slices/004-gate-honesty/signoff/round3.r2.signoff -slices/006-harness-honesty/FINDINGS.md -slices/006-harness-honesty/PLAN.md -slices/006-harness-honesty/logs/ci-evidence.txt -slices/006-harness-honesty/logs/gate-round1.txt -slices/006-harness-honesty/logs/green-mutation-under-load-round2.txt -slices/006-harness-honesty/logs/green-mutation-under-load.txt -slices/006-harness-honesty/logs/green-rate-mc64-idle-round2.txt -slices/006-harness-honesty/logs/green-rate-mc64-idle.txt -slices/006-harness-honesty/logs/green-rate-mc8-idle-round2.txt -slices/006-harness-honesty/logs/green-rate-mc8-idle.txt -slices/006-harness-honesty/logs/green-rate-mc8-load32-round2.txt -slices/006-harness-honesty/logs/green-rate-mc8-load32.txt -slices/006-harness-honesty/logs/mutation-harness-anchors-round2.txt -slices/006-harness-honesty/logs/mutation-harness-anchors.txt -slices/006-harness-honesty/logs/probe-drain-mechanism.txt -slices/006-harness-honesty/logs/probe-loss-reason.txt -slices/006-harness-honesty/logs/probe-loss-site.txt -slices/006-harness-honesty/logs/probe-mutate-dirty-target.txt -slices/006-harness-honesty/logs/probe-rate-mc8-load32-active.txt -slices/006-harness-honesty/logs/probe-rate-mc8-load32-passive.txt -slices/006-harness-honesty/logs/probe-write-shape.txt -slices/006-harness-honesty/logs/red-gate-credo-nesting.txt -slices/006-harness-honesty/logs/red-mutation-under-load.txt -slices/006-harness-honesty/logs/red-rate-mc64-idle.txt -slices/006-harness-honesty/logs/red-rate-mc8-idle.txt -slices/006-harness-honesty/logs/round1.h.md -slices/006-harness-honesty/logs/round1.h.tree -slices/006-harness-honesty/logs/round1.m.md -slices/006-harness-honesty/logs/round1.m.tree -slices/006-harness-honesty/logs/round2.h.md -slices/006-harness-honesty/logs/round2.h.tree -slices/006-harness-honesty/logs/round2.m.md -slices/006-harness-honesty/logs/round2.m.tree -slices/006-harness-honesty/logs/round3.h.md -slices/006-harness-honesty/logs/round3.h.tree -slices/006-harness-honesty/logs/round3.m.md -slices/006-harness-honesty/logs/round3.m.tree -slices/006-harness-honesty/logs/round4.h.md -slices/006-harness-honesty/logs/round4.h.tree -slices/006-harness-honesty/logs/round4.m.md -slices/006-harness-honesty/logs/round4.m.tree -slices/006-harness-honesty/signoff/round1.h.signoff -slices/006-harness-honesty/signoff/round1.m.signoff -slices/006-harness-honesty/signoff/round2.h.signoff -slices/006-harness-honesty/signoff/round2.m.signoff -slices/006-harness-honesty/signoff/round3.h.signoff -slices/006-harness-honesty/signoff/round3.m.signoff -slices/006-harness-honesty/signoff/round4.h.signoff -slices/006-harness-honesty/signoff/round4.m.signoff -slices/007-authorize-body/FINDINGS.md -slices/007-authorize-body/PLAN.md -slices/007-authorize-body/logs/green-raw-bytes.txt -slices/007-authorize-body/logs/mutation-authorize-body.txt -slices/007-authorize-body/logs/red-raw-bytes.txt